server: Fix a potential desktop reference leak.
This commit is contained in:
parent
93a02e7f65
commit
42e2c99ce2
server
|
@ -1963,6 +1963,9 @@ DECL_HANDLER(get_window_children)
|
||||||
atom_t atom = req->atom;
|
atom_t atom = req->atom;
|
||||||
struct desktop *desktop = NULL;
|
struct desktop *desktop = NULL;
|
||||||
|
|
||||||
|
get_req_unicode_str( &cls_name );
|
||||||
|
if (cls_name.len && !(atom = find_global_atom( NULL, &cls_name ))) return;
|
||||||
|
|
||||||
if (req->desktop)
|
if (req->desktop)
|
||||||
{
|
{
|
||||||
if (!(desktop = get_desktop_obj( current->process, req->desktop, DESKTOP_ENUMERATE ))) return;
|
if (!(desktop = get_desktop_obj( current->process, req->desktop, DESKTOP_ENUMERATE ))) return;
|
||||||
|
@ -1974,9 +1977,6 @@ DECL_HANDLER(get_window_children)
|
||||||
if (!parent && !(desktop = get_thread_desktop( current, 0 ))) return;
|
if (!parent && !(desktop = get_thread_desktop( current, 0 ))) return;
|
||||||
}
|
}
|
||||||
|
|
||||||
get_req_unicode_str( &cls_name );
|
|
||||||
if (cls_name.len && !(atom = find_global_atom( NULL, &cls_name ))) return;
|
|
||||||
|
|
||||||
if (parent)
|
if (parent)
|
||||||
total = get_children_windows( parent, atom, req->tid, NULL, 0 );
|
total = get_children_windows( parent, atom, req->tid, NULL, 0 );
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue