summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2016-08-04 15:50:12 +1000
committerStefan Metzmacher <metze@samba.org>2016-08-10 11:24:36 +0200
commitf00245748b49dd0c0b56f2d239d304ee9d439315 (patch)
treeb9355c24bdf90a57dd0d1ee80381cff124f5e4cf
parent2ffc30168e23ea037177ca929398b9a91c9134ea (diff)
downloadsamba-f00245748b49dd0c0b56f2d239d304ee9d439315.tar.gz
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 <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com> (cherry picked from commit 4541301d92e3c140adb6444143ad697d35926179)
-rw-r--r--ctdb/common/system_util.c1
1 files changed, 1 insertions, 0 deletions
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;
}