From e257e68b4bcd49c6401b0982e71f3f3085711750 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 30 Jun 2010 12:19:41 -0400 Subject: s3-spoolss: Allocate printer entries on the pipe struct. Signed-off-by: Andreas Schneider --- source3/rpc_server/srv_spoolss_nt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source3') 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; -- cgit