diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_parse/parse_reg.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source3/rpc_parse/parse_reg.c b/source3/rpc_parse/parse_reg.c index f3018cfb37..2698e82440 100644 --- a/source3/rpc_parse/parse_reg.c +++ b/source3/rpc_parse/parse_reg.c @@ -1701,7 +1701,11 @@ BOOL reg_io_q_open_entry(char *desc, REG_Q_OPEN_ENTRY *r_q, prs_struct *ps, int void init_reg_r_open_entry(REG_R_OPEN_ENTRY *r_r, POLICY_HND *pol, NTSTATUS status) { - memcpy(&r_r->pol, pol, sizeof(r_r->pol)); + if (NT_STATUS_IS_OK(status)) { + memcpy(&r_r->pol, pol, sizeof(r_r->pol)); + } else { + ZERO_STRUCT(r_r->pol); + } r_r->status = status; } |