diff options
author | Daniel Stone <daniel@fooishbar.org> | 2006-08-04 12:40:19 +0300 |
---|---|---|
committer | Daniel Stone <daniels@endtroducing.fooishbar.org> | 2006-08-04 12:40:19 +0300 |
commit | a406f6bfeaa46e3236f7ab46813fe6c30b936a35 (patch) | |
tree | 29c02d2195e72b1d4505df407fcfeb68a919732d /mi | |
parent | 997ba45b192f21810099ed888792a45f1677a9ce (diff) |
mieq: don't leak events
free all events posted through mieqEnqueue.
Diffstat (limited to 'mi')
-rw-r--r-- | mi/mieq.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -124,6 +124,7 @@ mieqEnqueue (xEvent *e) if (e->u.u.type == DeviceValuator) { if (laste->nevents >= 6) { ErrorF("mieqEnqueue: more than six valuator events; dropping.\n"); + free(e); return; } if (oldtail == miEventQueue.head || @@ -133,6 +134,7 @@ mieqEnqueue (xEvent *e) ((lastkbp->deviceid & DEVICE_BITS) != (v->deviceid & DEVICE_BITS))) { ErrorF("mieqEnequeue: out-of-order valuator event; dropping.\n"); + free(e); return; } laste->event[laste->nevents++] = *e; @@ -159,6 +161,7 @@ mieqEnqueue (xEvent *e) /* Toss events which come in late */ if (newtail == miEventQueue.head) { ErrorF("tossed event which came in late\n"); + free(e); return; } miEventQueue.tail = newtail; @@ -235,5 +238,7 @@ void mieqProcessInputEvents () ++miEventQueue.head; (*e->pDev->public.processInputProc)(e->event, e->pDev, e->nevents); } + + free(e->event); } } |