diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index c1ede19fcf..181868d186 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -646,12 +646,13 @@ static bool open_printer_hnd(struct pipes_struct *p, struct policy_handle *hnd, DEBUG(10,("open_printer_hnd: name [%s]\n", name)); - new_printer = TALLOC_ZERO_P(NULL, Printer_entry); + new_printer = talloc_zero(p->mem_ctx, Printer_entry); if (new_printer == NULL) { return false; } talloc_set_destructor(new_printer, printer_entry_destructor); + /* This also steals the printer_handle on the policy_handle */ if (!create_policy_hnd(p, hnd, new_printer)) { TALLOC_FREE(new_printer); return false; |