From 913eaa50191e6610c22eed5d6a7360c9b66ea221 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 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'mousefunc.c') diff --git a/mousefunc.c b/mousefunc.c index d52a458..f975d13 100644 --- a/mousefunc.c +++ b/mousefunc.c @@ -16,7 +16,7 @@ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * - * $OpenBSD: mousefunc.c,v 1.45 2013/04/08 13:02:31 okan Exp $ + * $OpenBSD: mousefunc.c,v 1.46 2013/04/08 15:43:04 okan Exp $ */ #include @@ -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 v1.2.3-2-gb3c3