Skip to content

Commit 230f96c

Browse files
committed
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); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 parent 76a5cff commit 230f96c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/core/screen.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,9 +749,8 @@ list_windows (MetaScreen *screen)
749749
else
750750
{
751751
info->xwindow = children[i];
752+
result = g_list_prepend (result, info);
752753
}
753-
754-
result = g_list_prepend (result, info);
755754
}
756755

757756
if (children)

0 commit comments

Comments
 (0)