summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2000-07-26 03:38:30 +0000
committerTim Potter <tpot@samba.org>2000-07-26 03:38:30 +0000
commitc89cf814cc976924c9e1db7ea448af3893a6f70d (patch)
tree20cb3e67098fbd2c6c994f563811cc1b05107336
parenta4243b3d9996738ff575d08fbdff5e3a3ba8adb3 (diff)
downloadsamba-c89cf814cc976924c9e1db7ea448af3893a6f70d.tar.gz
samba-c89cf814cc976924c9e1db7ea448af3893a6f70d.tar.bz2
samba-c89cf814cc976924c9e1db7ea448af3893a6f70d.zip
Fixed memory leaks in _spoolss_addprinterdriver()
(This used to be commit 1f49788442b0d1264c70166e727b8588b936e6ec)
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 30131482ac..288b9648b7 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -4177,14 +4177,18 @@ uint32 _spoolss_addprinterdriver(pipes_struct *p, const UNISTR2 *server_name,
clean_up_driver_struct(driver, level);
DEBUG(5,("Moving driver to final destination\n"));
- if(!move_driver_to_download_area(driver, level, &user))
- return ERROR_ACCESS_DENIED;
+ if(!move_driver_to_download_area(driver, level, &user)) {
+ err = ERROR_ACCESS_DENIED;
+ goto done;
+ }
- if (add_a_printer_driver(driver, level)!=0)
- return ERROR_ACCESS_DENIED;
+ if (add_a_printer_driver(driver, level)!=0) {
+ err = ERROR_ACCESS_DENIED;
+ goto done;
+ }
+ done:
free_a_printer_driver(driver, level);
-
return err;
}