diff options
Diffstat (limited to 'librpc/gen_ndr/srv_spoolss.c')
-rw-r--r-- | librpc/gen_ndr/srv_spoolss.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/librpc/gen_ndr/srv_spoolss.c b/librpc/gen_ndr/srv_spoolss.c index 79efbb5970..764c805397 100644 --- a/librpc/gen_ndr/srv_spoolss.c +++ b/librpc/gen_ndr/srv_spoolss.c @@ -467,6 +467,13 @@ static bool api_spoolss_AddPrinter(pipes_struct *p) NDR_PRINT_IN_DEBUG(spoolss_AddPrinter, r); } + ZERO_STRUCT(r->out); + r->out.handle = talloc_zero(r, struct policy_handle); + if (r->out.handle == NULL) { + talloc_free(r); + return false; + } + r->out.result = _spoolss_AddPrinter(p, r); if (p->rng_fault_state) { @@ -7649,6 +7656,12 @@ NTSTATUS rpc_spoolss_dispatch(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx, case NDR_SPOOLSS_ADDPRINTER: { struct spoolss_AddPrinter *r = (struct spoolss_AddPrinter *)_r; + ZERO_STRUCT(r->out); + r->out.handle = talloc_zero(mem_ctx, struct policy_handle); + if (r->out.handle == NULL) { + return NT_STATUS_NO_MEMORY; + } + r->out.result = _spoolss_AddPrinter(cli->pipes_struct, r); return NT_STATUS_OK; } |