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:
parent
8e7f33e93d
commit
0c5f2ba38e
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user