summaryrefslogtreecommitdiff
path: root/source3/printing/nt_printing.c
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2010-06-16 11:44:36 +0200
committerAndreas Schneider <asn@samba.org>2010-06-16 12:03:46 +0200
commit47ae4a518c5eb7c02d3f6c65f64d2ac490a90e83 (patch)
treea9fc7a7ec7899ad42a9059a6c452232e0a52e63c /source3/printing/nt_printing.c
parent18f3e5113ae18e120770ba93b0d36a7b176b0c52 (diff)
downloadsamba-47ae4a518c5eb7c02d3f6c65f64d2ac490a90e83.tar.gz
samba-47ae4a518c5eb7c02d3f6c65f64d2ac490a90e83.tar.bz2
samba-47ae4a518c5eb7c02d3f6c65f64d2ac490a90e83.zip
s3-spoolss: Provide a memory context for clean_up_driver_struct().
If we use a stack variable to setup spoolss_AddDriverInfoCtr this would segfault with a talloc bad magic value.
Diffstat (limited to 'source3/printing/nt_printing.c')
-rw-r--r--source3/printing/nt_printing.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c
index c87cfc1fe3..434311d665 100644
--- a/source3/printing/nt_printing.c
+++ b/source3/printing/nt_printing.c
@@ -1676,12 +1676,13 @@ static WERROR clean_up_driver_struct_level(TALLOC_CTX *mem_ctx,
/****************************************************************************
****************************************************************************/
-WERROR clean_up_driver_struct(struct pipes_struct *rpc_pipe,
+WERROR clean_up_driver_struct(TALLOC_CTX *mem_ctx,
+ struct pipes_struct *rpc_pipe,
struct spoolss_AddDriverInfoCtr *r)
{
switch (r->level) {
case 3:
- return clean_up_driver_struct_level(r, rpc_pipe,
+ return clean_up_driver_struct_level(mem_ctx, rpc_pipe,
r->info.info3->architecture,
&r->info.info3->driver_path,
&r->info.info3->data_file,
@@ -1690,7 +1691,7 @@ WERROR clean_up_driver_struct(struct pipes_struct *rpc_pipe,
r->info.info3->dependent_files,
&r->info.info3->version);
case 6:
- return clean_up_driver_struct_level(r, rpc_pipe,
+ return clean_up_driver_struct_level(mem_ctx, rpc_pipe,
r->info.info6->architecture,
&r->info.info6->driver_path,
&r->info.info6->data_file,