diff options
author | Jeremy Allison <jra@samba.org> | 2000-09-06 01:55:36 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2000-09-06 01:55:36 +0000 |
commit | 061fc961cd0f6f10e794402a56b80e0c0039e3b2 (patch) | |
tree | 5398127b7b8a54d6d59dc3022dc5b0f4a561070d | |
parent | a1f66a820d78244fcab960fe33999c76cc1d65c5 (diff) | |
download | samba-061fc961cd0f6f10e794402a56b80e0c0039e3b2.tar.gz samba-061fc961cd0f6f10e794402a56b80e0c0039e3b2.tar.bz2 samba-061fc961cd0f6f10e794402a56b80e0c0039e3b2.zip |
Fix from John Reilly for double free of printer struct.
Jeremy.
(This used to be commit c15b7e41e170ced4e4de2e08f6fba860f51e66ac)
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index a31858a3e0..d73fc649dd 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -3165,7 +3165,6 @@ static BOOL add_printer_hook(NT_PRINTER_INFO_LEVEL *printer) if ( ret != 0 ) { unlink(tmp_file); - free_a_printer(&printer,2); return False; } @@ -4296,9 +4295,11 @@ static uint32 spoolss_addprinterex_level_2( const UNISTR2 *uni_srv_name, convert_printer_info(info, printer, 2); if (*lp_addprinter_cmd() ) - if ( !add_printer_hook(printer) ) + if ( !add_printer_hook(printer) ) { + free_a_printer(&printer,2); return ERROR_ACCESS_DENIED; - + } + slprintf(name, sizeof(name)-1, "\\\\%s\\%s", global_myname, printer->info_2->sharename); |