commands.c: fix memory leak

This commit is contained in:
Michael Stapelberg 2016-01-09 13:39:00 +01:00
parent ada71471c1
commit 79594398e2
1 changed files with 5 additions and 0 deletions

View File

@ -62,6 +62,11 @@
HANDLE_INVALID_MATCH; \
\
if (match_is_empty(current_match)) { \
while (!TAILQ_EMPTY(&owindows)) { \
owindow *ow = TAILQ_FIRST(&owindows); \
TAILQ_REMOVE(&owindows, ow, owindows); \
free(ow); \
} \
owindow *ow = smalloc(sizeof(owindow)); \
ow->con = focused; \
TAILQ_INIT(&owindows); \