From f8e67f198ad6e42f7563390012f30fffe43b92f7 Mon Sep 17 00:00:00 2001 From: Wilco Baan Hofman Date: Sun, 28 Mar 2010 16:18:46 +0200 Subject: [PATCH] Revert "s4:registry - "util" - make "reg_key_add_abs" consistent with "reg_key_del_abs"" This reverts commit 9d8592978e28c492d971a3b5a4c0133febc149ea. Conflicts: source4/lib/registry/util.c Signed-off-by: Jelmer Vernooij --- source4/lib/registry/util.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/source4/lib/registry/util.c b/source4/lib/registry/util.c index 56d215cab71..5bc0a639506 100644 --- a/source4/lib/registry/util.c +++ b/source4/lib/registry/util.c @@ -272,13 +272,16 @@ WERROR reg_key_add_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_add_name(mem_ctx, parent, n, NULL, sec_desc, - result); - - talloc_free(parent); - talloc_free(n); + if (!W_ERROR_IS_OK(error)) { + DEBUG(2, ("Opening parent of %s failed with %s\n", path, + win_errstr(error))); + return error; } + error = reg_key_add_name(mem_ctx, parent, n, NULL, sec_desc, result); + + talloc_free(parent); + talloc_free(n); + return error; } -- 2.11.4.GIT