From: Justin Stephenson Date: Fri, 16 Nov 2018 21:53:33 +0000 (-0500) Subject: lib:printer_driver: Don't overwrite printprocessor X-Git-Tag: ldb-1.6.1~301 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5442355cdb527ddcaae509538c751b801a77a78c;p=thirdparty%2Fsamba.git 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 Reviewed-by: Andreas Schneider Reviewed-by: Bjoern Jacke --- 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);