From e4d6a91e68beae9112624c6d1320b8c7c1119917 Mon Sep 17 00:00:00 2001 From: rcyeske Date: Fri, 20 Oct 2000 03:37:54 +0000 Subject: free pointer and test for NULL names in unmanaged_window() --- src/manage.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/manage.c b/src/manage.c index c46509d..d40fb07 100644 --- a/src/manage.c +++ b/src/manage.c @@ -169,11 +169,20 @@ scanwins(screen_info *s) int unmanaged_window (Window w) { + char *wname; int i; for (i = 0; unmanaged_window_list[i]; i++) - if (!strcmp (unmanaged_window_list[i], get_window_name (w))) - return 1; + { + wname = get_window_name (w); + if (!wname) + return 1; + if (!strcmp (unmanaged_window_list[i], wname)) + { + free (wname); + return 1; + } + } return 0; } -- cgit v1.2.3