diff options
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index af413b8b70..2424c46691 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -4823,8 +4823,10 @@ static WERROR getprinter_level_4(Printer_entry *print_hnd, int snum, RPC_BUFFER if((printer=SMB_MALLOC_P(PRINTER_INFO_4))==NULL) return WERR_NOMEM; - if (!construct_printer_info_4(print_hnd, printer, snum)) + if (!construct_printer_info_4(print_hnd, printer, snum)) { + SAFE_FREE(printer); return WERR_NOMEM; + } /* check the required size. */ *needed += spoolss_size_printer_info_4(printer); |