diff options
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_spoolss_nt.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c index a8fc1bc229..026e7681e0 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -7413,13 +7413,11 @@ static WERROR spoolss_addprinterex_level_2( pipes_struct *p, const UNISTR2 *uni_ int snum; WERROR err = WERR_OK; - if ((printer = SMB_MALLOC_P(NT_PRINTER_INFO_LEVEL)) == NULL) { + if ( !(printer = TALLOC_ZERO_P(NULL, NT_PRINTER_INFO_LEVEL)) ) { DEBUG(0,("spoolss_addprinterex_level_2: malloc fail.\n")); return WERR_NOMEM; } - ZERO_STRUCTP(printer); - /* convert from UNICODE to ASCII - this allocates the info_2 struct inside *printer.*/ if (!convert_printer_info(info, printer, 2)) { free_a_printer(&printer, 2); |