diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-22 22:38:45 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2010-03-22 22:38:45 +0100 |
commit | c69afbbfd080c6a0f0d6b6db8745171b3cbc7830 (patch) | |
tree | cb5bda61af390bdc74837e1b183da381f36ab1ba | |
parent | 12f42e35bcbb819cb742c28538b7cc67ac9d93cf (diff) | |
download | samba-c69afbbfd080c6a0f0d6b6db8745171b3cbc7830.tar.gz samba-c69afbbfd080c6a0f0d6b6db8745171b3cbc7830.tar.bz2 samba-c69afbbfd080c6a0f0d6b6db8745171b3cbc7830.zip |
s4:registry - "reg_key_del/add_abs": call "talloc_free" only on valid objects
-rw-r--r-- | source4/lib/registry/util.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c index 91d1095f4c..456a9d355e 100644 --- a/source4/lib/registry/util.c +++ b/source4/lib/registry/util.c @@ -248,10 +248,10 @@ WERROR reg_key_del_abs(TALLOC_CTX *mem_ctx, struct registry_context *ctx, error = get_abs_parent(mem_ctx, ctx, path, &parent, &n); if (W_ERROR_IS_OK(error)) { error = reg_key_del(mem_ctx, parent, n); - } - talloc_free(parent); - talloc_free(n); + talloc_free(parent); + talloc_free(n); + } return error; } @@ -275,10 +275,10 @@ WERROR reg_key_add_abs(TALLOC_CTX *mem_ctx, struct registry_context *ctx, if (W_ERROR_IS_OK(error)) { error = reg_key_add_name(mem_ctx, parent, n, NULL, sec_desc, result); - } - talloc_free(parent); - talloc_free(n); + talloc_free(parent); + talloc_free(n); + } return error; } |