]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-daemon: Fix CID 1363067 Resource leak (RESOURCE_LEAK)
authorMartin Schwenke <martin@meltin.net>
Thu, 28 Jul 2016 02:06:23 +0000 (12:06 +1000)
committerKarolin Seeger <kseeger@samba.org>
Wed, 10 Aug 2016 09:37:23 +0000 (11:37 +0200)
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 c6a7f680ce74d4a630fa9305d0a926cc1a4b3d2c)

ctdb/server/ctdb_recover.c

index 19a84d20145c7213e92fdb47b7aae92809252528..1007f9c6ec6ae4d92fd75783ed65d086c306714b 100644 (file)
@@ -1201,6 +1201,7 @@ int32_t ctdb_control_receive_records(struct ctdb_context *ctdb,
                if (data.dsize < sizeof(struct ctdb_ltdb_header)) {
                        DEBUG(DEBUG_CRIT, (__location__ " bad ltdb record "
                                           "in indata\n"));
+                       talloc_free(records);
                        return -1;
                }