diff options
author | Michael Adam <obnox@samba.org> | 2007-07-08 22:01:43 +0000 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2007-07-08 22:01:43 +0000 |
commit | 8f85ae3af9c4087d488848ca5330858a6b125c2c (patch) | |
tree | 31fc61af541903cff700fd1878695b2fd8be56f5 /source/lib/util_tdb.c | |
parent | 4e558e249390a16972b1200159297b8f01da6bce (diff) | |
download | samba-8f85ae3af9c4087d488848ca5330858a6b125c2c.tar.gz samba-8f85ae3af9c4087d488848ca5330858a6b125c2c.tar.xz samba-8f85ae3af9c4087d488848ca5330858a6b125c2c.zip |
r23751: Call tdb_close even when validation was not successful.
Michael
Diffstat (limited to 'source/lib/util_tdb.c')
-rw-r--r-- | source/lib/util_tdb.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/source/lib/util_tdb.c b/source/lib/util_tdb.c index 38b92857195..5f9a5115b6b 100644 --- a/source/lib/util_tdb.c +++ b/source/lib/util_tdb.c @@ -994,7 +994,6 @@ static int tdb_validate_child(const char *tdb_path, int pfd) { int ret = -1; - int tfd = -1; int num_entries = 0; TDB_CONTEXT *tdb = NULL; struct tdb_validation_status v_status; @@ -1012,8 +1011,6 @@ static int tdb_validate_child(const char *tdb_path, goto out; } - tfd = tdb_fd(tdb); - /* Check the cache freelist is good. */ if (tdb_validate_freelist(tdb, &num_entries) == -1) { DEBUG(0,("tdb_validate_child: bad freelist in cache %s\n", @@ -1048,12 +1045,7 @@ static int tdb_validate_child(const char *tdb_path, out: if (tdb) { - if (ret == 0) { - tdb_close(tdb); - } - else if (tfd != -1) { - close(tfd); - } + tdb_close(tdb); } DEBUG(10, ("tdb_validate_child: writing status to pipe\n")); |