From: Amitay Isaacs Date: Thu, 4 Aug 2016 05:51:39 +0000 (+1000) Subject: ctdb-tools: Fix CID 1364704 - resource leak X-Git-Tag: tevent-0.9.30~214 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45b9c379b590ce0ff03ccaf6c970e0aee1a4b745;p=thirdparty%2Fsamba.git ctdb-tools: Fix CID 1364704 - resource leak BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121 Signed-off-by: Amitay Isaacs Reviewed-by: Martin Schwenke --- diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index 4e767ae0fd3..dd791148606 100644 --- a/ctdb/tools/ctdb.c +++ b/ctdb/tools/ctdb.c @@ -5737,6 +5737,7 @@ static int control_checktcpport(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb, v = fcntl(s, F_GETFL, 0); if (v == -1 || fcntl(s, F_SETFL, v | O_NONBLOCK)) { fprintf(stderr, "Unable to set socket non-blocking\n"); + close(s); return errno; }