summaryrefslogtreecommitdiff
path: root/lib/printer_driver
diff options
context:
space:
mode:
authorJustin Stephenson <jstephen@redhat.com>2018-11-16 16:53:33 -0500
committerBjoern Jacke <bjacke@samba.org>2019-01-28 15:44:18 +0100
commit5442355cdb527ddcaae509538c751b801a77a78c (patch)
tree66838d289bb2a28a13c7e14ec04ad3d5e93774fd /lib/printer_driver
parent166380111ba3a82b087ab3a54687d0ecabe5e819 (diff)
downloadsamba-5442355cdb527ddcaae509538c751b801a77a78c.tar.gz
lib:printer_driver: Don't overwrite printprocessor
If the printprocessor is parsed from the inf file in the codepath: setup_driver_name find_driver_files process_driver_section_printprocessor Don't overwrite the value later on in setup_driver_name with the default "winprint" Signed-off-by: Justin Stephenson <jstephen@redhat.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Bjoern Jacke <bjacke@samba.org>
Diffstat (limited to 'lib/printer_driver')
-rw-r--r--lib/printer_driver/printer_driver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/printer_driver/printer_driver.c b/lib/printer_driver/printer_driver.c
index 3b076b766ff..bd846035cca 100644
--- a/lib/printer_driver/printer_driver.c
+++ b/lib/printer_driver/printer_driver.c
@@ -1027,9 +1027,11 @@ static NTSTATUS setup_driver_by_name(TALLOC_CTX *mem_ctx,
return NT_STATUS_NO_MEMORY;
}
- r->print_processor = talloc_strdup(mem_ctx, "winprint");
if (r->print_processor == NULL) {
- return NT_STATUS_NO_MEMORY;
+ r->print_processor = talloc_strdup(mem_ctx, "winprint");
+ if (r->print_processor == NULL) {
+ return NT_STATUS_NO_MEMORY;
+ }
}
status = gp_inifile_getstring(ctx, "Version:Signature", &s);