s4:WINREG RPC server - Reintroduce the free operation on "CloseKey"
authorMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Wed, 18 Nov 2009 09:24:09 +0000 (10:24 +0100)
committerMatthias Dieter Wallnöfer <mwallnoefer@yahoo.de>
Fri, 27 Nov 2009 22:23:31 +0000 (23:23 +0100)
Better use "talloc_unlink" here Since we could have more than one reference.

source4/rpc_server/winreg/rpc_winreg.c

index 86617a606a34d7984f2720a8551e2d7db15a30ec..ba619c02f7c6e487e4793f53f9cb109290f61ff6 100644 (file)
@@ -98,6 +98,8 @@ static WERROR dcesrv_winreg_CloseKey(struct dcesrv_call_state *dce_call,
 
        DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
 
 
        DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
 
+       talloc_unlink(dce_call->context, h);
+
        ZERO_STRUCTP(r->out.handle);
 
        return WERR_OK;
        ZERO_STRUCTP(r->out.handle);
 
        return WERR_OK;