diff options
author | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-11-18 08:48:30 +0100 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mwallnoefer@yahoo.de> | 2009-11-27 23:23:32 +0100 |
commit | f7c28db475261fa859e8f1888a629ced6c447c60 (patch) | |
tree | 496ee543ea8c3d757d707ec6b5c404b6347c16b2 /source4/rpc_server | |
parent | 6f7cfb0e10a1967a59ff18221bd9941edcbc8790 (diff) | |
download | samba-f7c28db475261fa859e8f1888a629ced6c447c60.tar.gz samba-f7c28db475261fa859e8f1888a629ced6c447c60.tar.bz2 samba-f7c28db475261fa859e8f1888a629ced6c447c60.zip |
s4:WINREG RPC server - add another "talloc_unlink" in "DeleteKey"
Also here we waste memory - therefore free the pointless handle after the delete.
Diffstat (limited to 'source4/rpc_server')
-rw-r--r-- | source4/rpc_server/winreg/rpc_winreg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c index ba619c02f7..13c311cd96 100644 --- a/source4/rpc_server/winreg/rpc_winreg.c +++ b/source4/rpc_server/winreg/rpc_winreg.c @@ -166,6 +166,7 @@ static WERROR dcesrv_winreg_DeleteKey(struct dcesrv_call_state *dce_call, { struct dcesrv_handle *h; struct registry_key *key; + WERROR result; DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY); key = h->data; @@ -174,7 +175,10 @@ static WERROR dcesrv_winreg_DeleteKey(struct dcesrv_call_state *dce_call, { case SECURITY_SYSTEM: case SECURITY_ADMINISTRATOR: - return reg_key_del(key, r->in.key.name); + result = reg_key_del(key, r->in.key.name); + talloc_unlink(dce_call->context, h); + + return result; default: return WERR_ACCESS_DENIED; } |