1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

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)
This commit is contained in:
Martin Schwenke 2016-08-04 15:50:12 +10:00 committed by Stefan Metzmacher
parent 2ffc30168e
commit f00245748b

View File

@ -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;
}