diff options
author | Jeremy Allison <jra@samba.org> | 2006-03-12 19:16:45 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:15:20 -0500 |
commit | 05b4d0b38e53de20b7aad2bbb3c6a6788d23313f (patch) | |
tree | c291f6a406b573c8ddb43841bd804602e11689d5 /source3 | |
parent | f04579aaf88eede823ef7b9e9035603ae8746f21 (diff) | |
download | samba-05b4d0b38e53de20b7aad2bbb3c6a6788d23313f.tar.gz |
r14250: Fix coverity bug #107. Resource leak on error path.
Jeremy.
(This used to be commit ca96c7be778d01594a540917acd3c5c218d6459c)
Diffstat (limited to 'source3')
-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 2424c46691..951757d4c8 100644 --- a/source3/rpc_server/srv_spoolss_nt.c +++ b/source3/rpc_server/srv_spoolss_nt.c @@ -4862,8 +4862,10 @@ static WERROR getprinter_level_5(Printer_entry *print_hnd, int snum, RPC_BUFFER if((printer=SMB_MALLOC_P(PRINTER_INFO_5))==NULL) return WERR_NOMEM; - if (!construct_printer_info_5(print_hnd, printer, snum)) + if (!construct_printer_info_5(print_hnd, printer, snum)) { + free_printer_info_5(printer); return WERR_NOMEM; + } /* check the required size. */ *needed += spoolss_size_printer_info_5(printer); |