From c5ff6930821faed19640af87a7e285a061175f63 Mon Sep 17 00:00:00 2001 From: Gerald Carter Date: Tue, 1 Apr 2003 14:58:42 +0000 Subject: fix potential handle leak in _spoolss_open_printer_ex(); final fix for CR2102; reviewed by jra (This used to be commit 3d37e1ece913707f346c3c2459c3c42192a3a1a7) --- source3/rpc_server/srv_spoolss_nt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3') 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); -- cgit