summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2007-07-08 22:01:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:52 -0500
commit052ddc9cd0c1141104477ebd6c69320485b6315a (patch)
tree50ea7b1d412ff4f8089efa76c4e51d264a91ca4a /source3
parenta5946cb46af25ef43d0d554a81f114b85a882190 (diff)
downloadsamba-052ddc9cd0c1141104477ebd6c69320485b6315a.tar.gz
samba-052ddc9cd0c1141104477ebd6c69320485b6315a.tar.bz2
samba-052ddc9cd0c1141104477ebd6c69320485b6315a.zip
r23751: Call tdb_close even when validation was not successful.
Michael (This used to be commit b68856d9902f41079224ba11c7d0ab811b082201)
Diffstat (limited to 'source3')
-rw-r--r--source3/lib/util_tdb.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/source3/lib/util_tdb.c b/source3/lib/util_tdb.c
index 38b9285719..5f9a5115b6 100644
--- a/source3/lib/util_tdb.c
+++ b/source3/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"));