1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-03 04:22:09 +03:00

- don't allow locking to initialise twice

- check that it is initialised before de-initialising it!
(This used to be commit 68ad7b9199)
This commit is contained in:
Andrew Tridgell
1997-10-29 02:18:08 +00:00
parent 4fd96fddd2
commit cb6941a193

View File

@ -113,6 +113,8 @@ BOOL do_unlock(int fnum,int cnum,uint32 count,uint32 offset,int *eclass,uint32 *
****************************************************************************/
BOOL locking_init(int read_only)
{
if (share_ops) return True;
#ifdef FAST_SHARE_MODES
share_ops = locking_shm_init(read_only);
if (!share_ops) {
@ -135,7 +137,9 @@ BOOL locking_init(int read_only)
******************************************************************/
BOOL locking_end(void)
{
return share_ops->stop_mgmt();
if (share_ops)
return share_ops->stop_mgmt();
return True;
}