diff options
author | okan | 2013-04-08 15:43:04 +0000 |
---|---|---|
committer | okan | 2013-04-08 15:43:04 +0000 |
commit | 913eaa50191e6610c22eed5d6a7360c9b66ea221 (patch) | |
tree | 9d55634827a7b8a8d66610957e512cf06e1d5068 | |
parent | 1bc01b9715b04bacb85f434cc26458e80769e576 (diff) | |
download | cwm-913eaa50191e6610c22eed5d6a7360c9b66ea221.tar.gz |
plug memleak; always need to menuq_clear even when a selection is made.
-rw-r--r-- | mousefunc.c | 11 |
1 files changed, 6 insertions, 5 deletions
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 <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); } |