registry: Fix warning freeing talloc pointer with multiple parents.
authorJelmer Vernooij <jelmer@samba.org>
Sat, 26 Sep 2009 13:41:22 +0000 (15:41 +0200)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 26 Sep 2009 13:41:22 +0000 (15:41 +0200)
source4/lib/registry/regf.c

index 6d4ea1b68807b1deeae37c05df89dab4004d1b85..c5a74c79115916e89a6d3429be5b10cb8c01e3cf 100644 (file)
@@ -2144,7 +2144,7 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const char *location,
                                               regf->header->data_offset);
 
        /* We can drop our own reference now that *key will have created one */
-       talloc_free(regf);
+       talloc_unlink(parent_ctx, regf);
 
        return WERR_OK;
 }