summaryrefslogtreecommitdiff
path: root/source4/rpc_server/winreg/rpc_winreg.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/rpc_server/winreg/rpc_winreg.c')
-rw-r--r--source4/rpc_server/winreg/rpc_winreg.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c
index e8d4056b2a..b34ccfa4b9 100644
--- a/source4/rpc_server/winreg/rpc_winreg.c
+++ b/source4/rpc_server/winreg/rpc_winreg.c
@@ -126,16 +126,13 @@ static WERROR winreg_DeleteKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
struct winreg_DeleteKey *r)
{
struct dcesrv_handle *h;
- struct registry_key *key;
WERROR result;
h = dcesrv_handle_fetch(dce_call->conn, r->in.handle, HTYPE_REGKEY);
DCESRV_CHECK_HANDLE(h);
- result = reg_open_key(mem_ctx, (struct registry_key *)h->data, r->in.key.name, &key);
-
if (W_ERROR_IS_OK(result)) {
- return reg_key_del(key);
+ return reg_key_del((struct registry_key *)h->data, r->in.key.name);
}
return result;