From 42e2c99ce2ed61f4bd2261d8627629e374007724 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 26 Jun 2008 16:49:23 +0200 Subject: [PATCH] server: Fix a potential desktop reference leak. --- server/window.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/server/window.c b/server/window.c index 303a6cf8e05..1879b7c472c 100644 --- a/server/window.c +++ b/server/window.c @@ -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 -- 2.11.4.GIT