diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-22 19:47:49 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-22 22:31:03 +0100 |
commit | 5b6ad54f43741c0c25b35e44cafe5fed352ff133 (patch) | |
tree | 35919eb96628bc2f3dd2513b43ee476c6db1618b /source4 | |
parent | 9d8592978e28c492d971a3b5a4c0133febc149ea (diff) | |
download | samba-5b6ad54f43741c0c25b35e44cafe5fed352ff133.tar.gz samba-5b6ad54f43741c0c25b35e44cafe5fed352ff133.tar.bz2 samba-5b6ad54f43741c0c25b35e44cafe5fed352ff133.zip |
s4:registry - "util" - add also a memory context argument for "reg_key_del_abs"
Diffstat (limited to 'source4')
-rw-r--r-- | source4/lib/registry/registry.h | 3 | ||||
-rw-r--r-- | source4/lib/registry/util.c | 6 |
2 files changed, 4 insertions, 5 deletions
diff --git a/source4/lib/registry/registry.h b/source4/lib/registry/registry.h index 3ac50d517d..8fe26cecd5 100644 --- a/source4/lib/registry/registry.h +++ b/source4/lib/registry/registry.h @@ -460,7 +460,8 @@ bool reg_string_to_val(TALLOC_CTX *mem_ctx, struct smb_iconv_convenience *iconv_ const char *data_str, uint32_t *type, DATA_BLOB *data); WERROR reg_open_key_abs(TALLOC_CTX *mem_ctx, struct registry_context *handle, const char *name, struct registry_key **result); -WERROR reg_key_del_abs(struct registry_context *ctx, const char *path); +WERROR reg_key_del_abs(TALLOC_CTX *mem_ctx, struct registry_context *ctx, + const char *path); WERROR reg_key_add_abs(TALLOC_CTX *mem_ctx, struct registry_context *ctx, const char *path, uint32_t access_mask, struct security_descriptor *sec_desc, diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c index fc5244a151..8c855c25ed 100644 --- a/source4/lib/registry/util.c +++ b/source4/lib/registry/util.c @@ -234,11 +234,11 @@ static WERROR get_abs_parent(TALLOC_CTX *mem_ctx, struct registry_context *ctx, return WERR_OK; } -WERROR reg_key_del_abs(struct registry_context *ctx, const char *path) +WERROR reg_key_del_abs(TALLOC_CTX *mem_ctx, struct registry_context *ctx, + const char *path) { struct registry_key *parent; const char *n; - TALLOC_CTX *mem_ctx = talloc_init("reg_key_del_abs"); WERROR error; if (!strchr(path, '\\')) { @@ -250,8 +250,6 @@ WERROR reg_key_del_abs(struct registry_context *ctx, const char *path) error = reg_key_del(mem_ctx, parent, n); } - talloc_free(mem_ctx); - talloc_free(parent); talloc_free(n); |