about summary refs log tree commit diff
path: root/mousefunc.c
diff options
context:
space:
mode:
authorokan <okan>2013-04-08 15:43:04 +0000
committerokan <okan>2013-04-08 15:43:04 +0000
commit58c1d48d10cd7bec3bd186ef2f584b1ad1974f5b (patch)
tree836ed7bd262d52636dec3493193aa7e288fc4584 /mousefunc.c
parent62a685d82a7c2c91ce82323778f0105d34ad7321 (diff)
downloadcwm-58c1d48d10cd7bec3bd186ef2f584b1ad1974f5b.tar.gz
cwm-58c1d48d10cd7bec3bd186ef2f584b1ad1974f5b.tar.xz
cwm-58c1d48d10cd7bec3bd186ef2f584b1ad1974f5b.zip
plug memleak; always need to menuq_clear even when a selection is made.
Diffstat (limited to 'mousefunc.c')
-rw-r--r--mousefunc.c9
1 files changed, 5 insertions, 4 deletions
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);
 }