]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Changed code to use proper talloc context instead of NULL to control memory leak.
authorscudette@gmail.com <scudette@gmail.com>
Fri, 2 Jan 2009 11:41:04 +0000 (22:41 +1100)
committerVolker Lendecke <vl@samba.org>
Fri, 2 Jan 2009 19:55:20 +0000 (20:55 +0100)
source4/lib/registry/regf.c
source4/lib/registry/tools/common.c

index d6fb413b51e52c44bab663232fda4ac5312bf830..4cbcb09a1027329412112b59c5411ad459d18126 100644 (file)
@@ -2045,7 +2045,7 @@ WERROR reg_open_regf_file(TALLOC_CTX *parent_ctx, const char *location,
        struct tdr_pull *pull;
        int i;
 
-       regf = (struct regf_data *)talloc_zero(NULL, struct regf_data);
+       regf = (struct regf_data *)talloc_zero(parent_ctx, struct regf_data);
 
        regf->iconv_convenience = iconv_convenience;
 
index c9f1248bf8e628506b3dda494861f421c2650a31..d997cb0fde585d6797d6c968b1d1b5c65f3a67b0 100644 (file)
@@ -51,7 +51,7 @@ struct registry_key *reg_common_open_file(const char *path,
        struct registry_context *h = NULL;
        WERROR error;
 
-       error = reg_open_hive(NULL, path, NULL, creds, ev_ctx, lp_ctx, &hive_root);
+       error = reg_open_hive(ev_ctx, path, NULL, creds, ev_ctx, lp_ctx, &hive_root);
 
        if(!W_ERROR_IS_OK(error)) {
                fprintf(stderr, "Unable to open '%s': %s \n",