aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/mi/mieq.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/mi/mieq.c')
-rw-r--r--xorg-server/mi/mieq.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/xorg-server/mi/mieq.c b/xorg-server/mi/mieq.c
index 9b6d0c901..2d5f23ea6 100644
--- a/xorg-server/mi/mieq.c
+++ b/xorg-server/mi/mieq.c
@@ -439,10 +439,13 @@ mieqProcessInputEvents(void)
evlen = e->events->evlen;
if(evlen > event_size)
+ {
+ event_size=evlen;
event = xrealloc(event, evlen);
+ if (!event)
+ FatalError("[mi] No memory left for event processing.\n");
+ }
- if (!event)
- FatalError("[mi] No memory left for event processing.\n");
memcpy(event, e->events->event, evlen);