s4:ldif_handlers Fix memory leak in objectCategory LDIF handler
authorAndrew Bartlett <abartlet@samba.org>
Tue, 1 Sep 2009 09:56:56 +0000 (19:56 +1000)
committerAndrew Tridgell <tridge@samba.org>
Wed, 23 Sep 2009 21:01:30 +0000 (14:01 -0700)
source4/lib/ldb-samba/ldif_handlers.c

index d1bdd957eeecb8d6e16c578bd7734c9f1ab9e6af..43a10450d1cb3689af2f5a7ba6143d4151047012 100644 (file)
@@ -432,6 +432,7 @@ static int ldif_canonicalise_objectCategory(struct ldb_context *ldb, void *mem_c
        }
 
        if (!schema) {
+               talloc_free(tmp_ctx);
                *out = data_blob_talloc(mem_ctx, in->data, in->length);
                if (in->data && !out->data) {
                        return LDB_ERR_OPERATIONS_ERROR;