fixed an (unlikely) memory leak
authorAndrew Tridgell <tridge@samba.org>
Mon, 15 Sep 2008 04:51:35 +0000 (14:51 +1000)
committerMichael Adam <obnox@samba.org>
Mon, 29 Sep 2008 12:01:01 +0000 (14:01 +0200)
source3/lib/dbwrap_ctdb.c

index cd37d9e917b50f90beb97b19359ed31cde5a38d8..2818634b14386224a1fe7d2dfeac6f7426661581 100644 (file)
@@ -442,6 +442,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;