aboutsummaryrefslogtreecommitdiffstats
path: root/xkbdbind.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2018-01-24 23:14:20 +0100
committerMattias Andrée <maandree@kth.se>2018-01-24 23:14:20 +0100
commitb462de243a5364e6d6d4b07dced941d741f0ad7a (patch)
treeabcbf73107ebd8d0978ac5f6c86a58338d168ff3 /xkbdbind.c
parentFirst commit (diff)
downloadxkbdbind-b462de243a5364e6d6d4b07dced941d741f0ad7a.tar.gz
xkbdbind-b462de243a5364e6d6d4b07dced941d741f0ad7a.tar.bz2
xkbdbind-b462de243a5364e6d6d4b07dced941d741f0ad7a.tar.xz
Fix memory leak (P.S. I hate XCB's memory management)
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--xkbdbind.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xkbdbind.c b/xkbdbind.c
index 6df0520..f012df3 100644
--- a/xkbdbind.c
+++ b/xkbdbind.c
@@ -134,7 +134,7 @@ main(int argc, char *argv[])
next_e = xcb_poll_for_event(xconn);
if (suppress > 0) {
suppress = 0;
- continue;
+ goto next;
}
switch (e->response_type & ~0x80) {
case XCB_KEY_RELEASE:
@@ -157,6 +157,8 @@ main(int argc, char *argv[])
}
break;
}
+ next:
+ free(e);
}
perror(argv0);