Revert "s4:registry - adaptions for "add memory contexts for delete value/key functions""
[ira/wip.git] / source4 / lib / registry / util.c
index 5bc0a639506d2d2470cc23e9b35a88728c2a3c54..35d2025411ff87c101185e2dac6d947d901ec65a 100644 (file)
@@ -234,11 +234,12 @@ static WERROR get_abs_parent(TALLOC_CTX *mem_ctx, struct registry_context *ctx,
        return WERR_OK;
 }
 
-WERROR reg_key_del_abs(TALLOC_CTX *mem_ctx, struct registry_context *ctx,
-                      const char *path)
+WERROR reg_key_del_abs(struct registry_context *ctx, const char *path)
 {
        struct registry_key *parent;
        char *n;
+       const char *n;
+       TALLOC_CTX *mem_ctx = talloc_init("reg_key_del_abs");
        WERROR error;
 
        if (!strchr(path, '\\')) {
@@ -252,6 +253,8 @@ WERROR reg_key_del_abs(TALLOC_CTX *mem_ctx, struct registry_context *ctx,
                talloc_free(parent);
                talloc_free(n);
        }
+       talloc_free(mem_ctx);
+
 
        return error;
 }