mirror of
https://github.com/samba-team/samba.git
synced 2024-12-28 07:21:54 +03:00
fix potential handle leak in _spoolss_open_printer_ex(); final fix for CR2102; reviewed by jra
(This used to be commit 50c25e54ff
)
This commit is contained in:
parent
0558497966
commit
45c7b76da3
@ -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…
Reference in New Issue
Block a user