diff options
author | Gerald Carter <jerry@samba.org> | 2003-04-01 14:58:42 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-04-01 14:58:42 +0000 |
commit | c5ff6930821faed19640af87a7e285a061175f63 (patch) | |
tree | a207cd4c72a1a7733f31ed5fbc4f3e8e8381c405 /source3/rpc_server | |
parent | 916ef755d37994b1ebeb0bb956502bc9c59e161d (diff) | |
download | samba-c5ff6930821faed19640af87a7e285a061175f63.tar.gz samba-c5ff6930821faed19640af87a7e285a061175f63.tar.xz 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')
-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 9c9dd438b34..c2729001e42 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); |