1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-24 21:34:56 +03:00

r3597: implement a suggestion from abartlet. By taking a refernce to the

database in the opendb lck, we ensure that the database is not closed
before the lock is gone. That ensures the lock destructor doesn't work
on a closed database.
(This used to be commit 218e01441a)
This commit is contained in:
Andrew Tridgell 2004-11-07 10:20:50 +00:00 committed by Gerald (Jerry) Carter
parent 8e7f33e93d
commit 0c5f2ba38e

View File

@ -130,7 +130,7 @@ struct odb_lock *odb_lock(TALLOC_CTX *mem_ctx,
return NULL;
}
lck->odb = odb;
lck->odb = talloc_reference(lck, odb);
lck->key.dptr = talloc_memdup(lck, file_key->data, file_key->length);
lck->key.dsize = file_key->length;
if (lck->key.dptr == NULL) {