summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2017-02-16 16:55:35 +0100
committerAndreas Schneider <asn@cryptomilk.org>2017-02-17 18:43:15 +0100
commit8ebe9f8551ad6fa9cbc49b283360e608e381656a (patch)
tree575416ae89fb5ec3f24615c8071dd8904439cafb /ctdb
parent2458752fd06b3ebf760455208a524e335b9d48ba (diff)
downloadsamba-8ebe9f8551ad6fa9cbc49b283360e608e381656a.tar.gz
ctdb: Do not leak fd handle in control_restoredb()
Found by covscan. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12592 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Fri Feb 17 18:43:16 CET 2017 on sn-devel-144
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/tools/ctdb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index 050906c510d..ae74ef818cb 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -4403,6 +4403,7 @@ static int control_restoredb(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
}
printf("Database %s restored\n", db_name);
+ close(fd);
return 0;