summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-06-30 12:19:41 -0400
committerAndreas Schneider <asn@samba.org>2010-09-10 15:49:03 +0200
commite257e68b4bcd49c6401b0982e71f3f3085711750 (patch)
treea497b3d85af871b8b092c894655fea2c3fe28719 /source3/rpc_server
parent0e5b1a67d26f99ae6d6f5e05f968dd3107191791 (diff)
downloadsamba-e257e68b4bcd49c6401b0982e71f3f3085711750.tar.gz
samba-e257e68b4bcd49c6401b0982e71f3f3085711750.tar.bz2
samba-e257e68b4bcd49c6401b0982e71f3f3085711750.zip
s3-spoolss: Allocate printer entries on the pipe struct.
Signed-off-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c3
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;