From f00245748b49dd0c0b56f2d239d304ee9d439315 Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Thu, 4 Aug 2016 15:50:12 +1000 Subject: ctdb-common: Fix CID 1363227 Resource leak (RESOURCE_LEAK) Occurs on an invalid line that isn't the first. Isn't really a leak because it is allocated off mem_ctx, which should be freed by the caller. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12110 Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs (cherry picked from commit 4541301d92e3c140adb6444143ad697d35926179) --- ctdb/common/system_util.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ctdb/common/system_util.c b/ctdb/common/system_util.c index ea53f5d7d41..9fc6c444d60 100644 --- a/ctdb/common/system_util.c +++ b/ctdb/common/system_util.c @@ -420,6 +420,7 @@ int ctdb_parse_connections(FILE *fp, TALLOC_CTX *mem_ctx, if (ret != 2) { DEBUG(DEBUG_ERR, ("Bad line [%d]: %s\n", line_num, line)); + talloc_free(conn); return EINVAL; } -- cgit v1.2.1