mirror of
https://github.com/samba-team/samba.git
synced 2025-02-15 05:57:49 +03:00
fix potential handle leak in _spoolss_open_printer_ex(); final fix for CR2102; reviewed by jra
(This used to be commit 3d37e1ece913707f346c3c2459c3c42192a3a1a7)
This commit is contained in:
parent
916ef755d3
commit
c5ff693082
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user