summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-04-01 14:57:59 +0000
committerGerald Carter <jerry@samba.org>2003-04-01 14:57:59 +0000
commit45c7b76da3f738095910ebfe04d2f173000c59e7 (patch)
tree68c5fe2b7871bc0deb2404982e67122acf705686
parent05584979663f5309d8b9512bd3695b02e084376b (diff)
downloadsamba-45c7b76da3f738095910ebfe04d2f173000c59e7.tar.gz
samba-45c7b76da3f738095910ebfe04d2f173000c59e7.tar.bz2
samba-45c7b76da3f738095910ebfe04d2f173000c59e7.zip
fix potential handle leak in _spoolss_open_printer_ex(); final fix for CR2102; reviewed by jra
(This used to be commit 50c25e54ff05bfb01a93e84afd2ad92e90d5a5c2)
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c4
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 4dd4456b2c..3c309d6e16 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -1623,8 +1623,10 @@ Can't find printer handle we created for printer %s\n", name ));
/* NT doesn't let us connect to a printer if the connecting user
doesn't have print permission. */
- if (!get_printer_snum(p, handle, &snum))
+ if (!get_printer_snum(p, handle, &snum)) {
+ close_printer_handle(p, handle);
return WERR_BADFID;
+ }
se_map_standard(&printer_default->access_required, &printer_std_mapping);