mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
r13773: Be consistent in the way you get out and free allocated data
This commit is contained in:
parent
551dd12baf
commit
1113d4caa7
@ -173,6 +173,7 @@ static int tdb_traverse_internal(struct tdb_context *tdb,
|
||||
/* Drop chain lock, call out */
|
||||
if (tdb_unlock(tdb, tl->hash, tl->lock_rw) != 0) {
|
||||
ret = -1;
|
||||
SAFE_FREE(key.dptr);
|
||||
goto out;
|
||||
}
|
||||
if (fn && fn(tdb, key, dbuf, private)) {
|
||||
@ -182,9 +183,8 @@ static int tdb_traverse_internal(struct tdb_context *tdb,
|
||||
TDB_LOG((tdb, 0, "tdb_traverse: unlock_record failed!\n"));;
|
||||
ret = -1;
|
||||
}
|
||||
tdb->travlocks.next = tl->next;
|
||||
SAFE_FREE(key.dptr);
|
||||
return count;
|
||||
goto out;
|
||||
}
|
||||
SAFE_FREE(key.dptr);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user