diff options
author | Amitay Isaacs <amitay@gmail.com> | 2016-08-04 15:51:39 +1000 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2016-08-10 11:24:37 +0200 |
commit | 15c6776147bf1a1db6e9ac417b4c186bb5ae2521 (patch) | |
tree | cb4788a01556e8d072e0097624b82d78c53d73ab | |
parent | 5e6bcb988aee0a8fcabdb34d06ac0590de2c6d01 (diff) | |
download | samba-15c6776147bf1a1db6e9ac417b4c186bb5ae2521.tar.gz |
ctdb-tools: Fix CID 1364704 - resource leak
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12121
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit 45b9c379b590ce0ff03ccaf6c970e0aee1a4b745)
-rw-r--r-- | ctdb/tools/ctdb.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c index fbf89f51594..28b3dc9d303 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; } |