Commit 42e2c99c authored by Alexandre Julliard's avatar Alexandre Julliard

server: Fix a potential desktop reference leak.

parent 93a02e7f
......@@ -1963,6 +1963,9 @@ DECL_HANDLER(get_window_children)
atom_t atom = req->atom;
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 (!(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;
}
get_req_unicode_str( &cls_name );
if (cls_name.len && !(atom = find_global_atom( NULL, &cls_name ))) return;
if (parent)
total = get_children_windows( parent, atom, req->tid, NULL, 0 );
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment