diff options
author | rcyeske <rcyeske> | 2000-10-20 03:37:54 +0000 |
---|---|---|
committer | rcyeske <rcyeske> | 2000-10-20 03:37:54 +0000 |
commit | e4d6a91e68beae9112624c6d1320b8c7c1119917 (patch) | |
tree | bc9423df3d0059e35b0d16b7ab0d4121dbee43e7 /src | |
parent | 8e82dddf7db0925d396a2118aca2a94a0d57acf4 (diff) | |
download | ratpoison-e4d6a91e68beae9112624c6d1320b8c7c1119917.zip |
free pointer and test for NULL names in unmanaged_window()
Diffstat (limited to 'src')
-rw-r--r-- | src/manage.c | 13 |
1 files 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; } |