summaryrefslogtreecommitdiff
path: root/source3/tdb
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-03-02 18:34:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:10:54 -0500
commitac026205819b66a02284d496c6cf31d4ea3a7302 (patch)
treefe06541201771864cd9d5923dac045c1293a5a97 /source3/tdb
parent30675b36f5e6072fbc4f93270c846e0c5d764254 (diff)
downloadsamba-ac026205819b66a02284d496c6cf31d4ea3a7302.tar.gz
samba-ac026205819b66a02284d496c6cf31d4ea3a7302.tar.bz2
samba-ac026205819b66a02284d496c6cf31d4ea3a7302.zip
r13792: Merged Simo's fixes for tdbtraverse.
Jeremy. (This used to be commit 9ed3bd431c8b8073e177df463e254cf45529bed6)
Diffstat (limited to 'source3/tdb')
-rw-r--r--source3/tdb/tdb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/tdb/tdb.c b/source3/tdb/tdb.c
index 5d70c046d3..f07f474716 100644
--- a/source3/tdb/tdb.c
+++ b/source3/tdb/tdb.c
@@ -1397,6 +1397,7 @@ int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *private_val)
/* Drop chain lock, call out */
if (tdb_unlock(tdb, tl.hash, F_WRLCK) != 0) {
ret = -1;
+ SAFE_FREE(key.dptr);
goto out;
}
if (fn && fn(tdb, key, dbuf, private_val)) {
@@ -1406,9 +1407,8 @@ int tdb_traverse(TDB_CONTEXT *tdb, tdb_traverse_func fn, void *private_val)
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);
}