From 58c1d48d10cd7bec3bd186ef2f584b1ad1974f5b Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 8 Apr 2013 15:43:04 +0000 Subject: plug memleak; always need to menuq_clear even when a selection is made. --- mousefunc.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'mousefunc.c') diff --git a/mousefunc.c b/mousefunc.c index c8edf6a..878f63a 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -251,8 +251,9 @@ mousefunc_menu_unhide(struct client_ctx *cc, void *arg) if (old_cc != NULL) client_ptrsave(old_cc); client_ptrwarp(cc); - } else - menuq_clear(&menuq); + } + + menuq_clear(&menuq); } void @@ -277,6 +278,6 @@ mousefunc_menu_cmd(struct client_ctx *cc, void *arg) mi = menu_filter(sc, &menuq, NULL, NULL, 0, NULL, NULL); if (mi != NULL) u_spawn(((struct cmd *)mi->ctx)->image); - else - menuq_clear(&menuq); + + menuq_clear(&menuq); } -- cgit 1.4.1