From 58c6a2d7910feea665fb0f6a664e5091f19a8e2d Mon Sep 17 00:00:00 2001 From: Pablo Barciela Date: Tue, 26 Feb 2019 18:03:25 +0100 Subject: screen: Fix use of memory after it is freed Fixes Clang static analyzer warning: core/screen.c:754:16: warning: Use of memory after it is freed result = g_list_prepend (result, info); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- src/core/screen.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/core') diff --git a/src/core/screen.c b/src/core/screen.c index c03530c2..e0e4e506 100644 --- a/src/core/screen.c +++ b/src/core/screen.c @@ -749,9 +749,8 @@ list_windows (MetaScreen *screen) else { info->xwindow = children[i]; + result = g_list_prepend (result, info); } - - result = g_list_prepend (result, info); } if (children) -- cgit v1.2.1