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.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/xorg-server/mi/mieq.c b/xorg-server/mi/mieq.c
index b06ff0447..01b4ae2a3 100644
--- a/xorg-server/mi/mieq.c
+++ b/xorg-server/mi/mieq.c
@@ -439,13 +439,14 @@ mieqProcessInputEvents(void)
evlen = e->events->evlen;
if(evlen > event_size)
- {
+ {
event = xrealloc(event, evlen);
- event_size = evlen;
- }
+ event_size=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);