diff options
author | Simo Sorce <idra@samba.org> | 2006-03-01 20:06:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 13:52:11 -0500 |
commit | 0efc7293181dc06d79c0edc21677f900597fc760 (patch) | |
tree | cda28beb8ee518f226b8a4f3e9f602b166053bf8 | |
parent | 685b824aa88a03a8b70507d5d2454a744468075a (diff) | |
download | samba-0efc7293181dc06d79c0edc21677f900597fc760.tar.gz samba-0efc7293181dc06d79c0edc21677f900597fc760.tar.bz2 samba-0efc7293181dc06d79c0edc21677f900597fc760.zip |
r13773: Be consistent in the way you get out and free allocated data
(This used to be commit 1113d4caa7bea1a7ffb9a50f42c5672bc1d452b4)
-rw-r--r-- | source4/lib/tdb/common/traverse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/lib/tdb/common/traverse.c b/source4/lib/tdb/common/traverse.c index 00fe5be923..dc1060c6d0 100644 --- a/source4/lib/tdb/common/traverse.c +++ b/source4/lib/tdb/common/traverse.c @@ -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); } |