summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_spoolss_nt.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-04-01 14:58:42 +0000
committerGerald Carter <jerry@samba.org>2003-04-01 14:58:42 +0000
commitc5ff6930821faed19640af87a7e285a061175f63 (patch)
treea207cd4c72a1a7733f31ed5fbc4f3e8e8381c405 /source3/rpc_server/srv_spoolss_nt.c
parent916ef755d37994b1ebeb0bb956502bc9c59e161d (diff)
downloadsamba-c5ff6930821faed19640af87a7e285a061175f63.tar.gz
samba-c5ff6930821faed19640af87a7e285a061175f63.tar.bz2
samba-c5ff6930821faed19640af87a7e285a061175f63.zip
fix potential handle leak in _spoolss_open_printer_ex(); final fix for CR2102; reviewed by jra
(This used to be commit 3d37e1ece913707f346c3c2459c3c42192a3a1a7)
Diffstat (limited to 'source3/rpc_server/srv_spoolss_nt.c')
-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 9c9dd438b3..c2729001e4 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);