From: David Hill Date: Fri, 20 Jul 2012 16:54:38 +0000 (-0400) Subject: plug memleak in find_window X-Git-Url: https://jasonwoof.com/gitweb/?a=commitdiff_plain;h=972d8078dac803b2896f7bfb3958d9e801e3321a;p=spectrwm.git plug memleak in find_window --- diff --git a/spectrwm.c b/spectrwm.c index c674051..1751412 100644 --- a/spectrwm.c +++ b/spectrwm.c @@ -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++)