summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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);