JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
plug memleak in find_window
authorDavid Hill <dhill@conformal.com>
Fri, 20 Jul 2012 16:54:38 +0000 (12:54 -0400)
committerReginald Kennedy <rk@rejii.com>
Fri, 20 Jul 2012 22:00:03 +0000 (06:00 +0800)
spectrwm.c

index c674051..1751412 100644 (file)
@@ -2299,8 +2299,10 @@ find_window(xcb_window_t id)
                return (NULL);
 
        /* if we were looking for the parent return that window instead */
-       if (r->parent == 0 || r->root == r->parent)
+       if (r->parent == 0 || r->root == r->parent) {
+               free(r);
                return (NULL);
+       }
 
        /* look for parent */
        for (i = 0; i < num_screens; i++)