summaryrefslogtreecommitdiff
path: root/app/cwm/mousefunc.c
diff options
context:
space:
mode:
authorOkan Demirmen <okan@cvs.openbsd.org>2013-04-08 15:43:05 +0000
committerOkan Demirmen <okan@cvs.openbsd.org>2013-04-08 15:43:05 +0000
commit795c44c35acd814aa57c624c146e2e02c3a7fb42 (patch)
tree5a6ded7c5cbc3a7de997fe3892f065fce2abe123 /app/cwm/mousefunc.c
parentbb61e4b9c75efbf7097f0388a9e320e97445d268 (diff)
plug memleak; always need to menuq_clear even when a selection is made.
Diffstat (limited to 'app/cwm/mousefunc.c')
-rw-r--r--app/cwm/mousefunc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/app/cwm/mousefunc.c b/app/cwm/mousefunc.c
index d52a45870..f975d1395 100644
--- a/app/cwm/mousefunc.c
+++ b/app/cwm/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 <sys/param.h>
@@ -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);
}