fixed an (unlikely) memory leak
authorAndrew Tridgell <tridge@samba.org>
Mon, 29 Sep 2008 19:04:57 +0000 (12:04 -0700)
committerJeremy Allison <jra@samba.org>
Mon, 29 Sep 2008 19:04:57 +0000 (12:04 -0700)
source/lib/dbwrap_ctdb.c

index e82e75d8b46832f085b0010fea5bf4b2ec891ca1..1e3a97f06548fa38dbe4a017e47363b025569123 100644 (file)
@@ -440,6 +440,7 @@ static struct db_record *db_ctdb_fetch_locked_persistent(struct db_ctdb_ctx *ctx
        recp = talloc(rec, struct db_record *);
        if (recp == NULL) {
                ctx->db->transaction_cancel(ctx->db);
+               talloc_free(rec);
                return NULL;
        }
        *recp = rec;