]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-daemon: Fix CID 1363233 Resource leak (RESOURCE_LEAK)
authorMartin Schwenke <martin@meltin.net>
Thu, 28 Jul 2016 02:00:27 +0000 (12:00 +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 74aca5f4c671d9f15ae6c3a901978a1cf247dd6f)

ctdb/server/ctdb_recover.c

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