summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-08-20 04:40:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:33:35 -0500
commitd5edfef3257ba624d8dbd0f3ffb6dc55afc955c8 (patch)
treea12b34537fc13d4928e26b7a92c571ee8f8f229e /source4
parentfd74e3e1f5eb1a20be773627864415676b0cec21 (diff)
downloadsamba-d5edfef3257ba624d8dbd0f3ffb6dc55afc955c8.tar.gz
samba-d5edfef3257ba624d8dbd0f3ffb6dc55afc955c8.tar.bz2
samba-d5edfef3257ba624d8dbd0f3ffb6dc55afc955c8.zip
r9410: - a winreg_CloseKey() should return a zero key on success (zeroing the
callers key). This is the normal pattern with rpc handles. - fixed reference to undefined error variable in winreg_DeleteKey() (This used to be commit 6757d51a280d6c393648a384f1ef3ca403517352)
Diffstat (limited to 'source4')
-rw-r--r--source4/rpc_server/winreg/rpc_winreg.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/source4/rpc_server/winreg/rpc_winreg.c b/source4/rpc_server/winreg/rpc_winreg.c
index f1dced3817..e20d9aa6b6 100644
--- a/source4/rpc_server/winreg/rpc_winreg.c
+++ b/source4/rpc_server/winreg/rpc_winreg.c
@@ -85,6 +85,8 @@ static WERROR winreg_CloseKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
talloc_free(h);
+ ZERO_STRUCTP(r->out.handle);
+
return WERR_OK;
}
@@ -123,15 +125,10 @@ static WERROR winreg_DeleteKey(struct dcesrv_call_state *dce_call, TALLOC_CTX *m
struct winreg_DeleteKey *r)
{
struct dcesrv_handle *h;
- WERROR result;
DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
-
- if (W_ERROR_IS_OK(result)) {
- return reg_key_del((struct registry_key *)h->data, r->in.key.name);
- }
-
- return result;
+
+ return reg_key_del((struct registry_key *)h->data, r->in.key.name);
}