summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2010-10-13 17:34:31 +0100
committerJeremy Huddleston <jeremyhu@apple.com>2010-10-14 10:08:04 -0700
commit712853fbcbc644575d791fa48fbd5757cd850f1d (patch)
tree48d7449143828c29035843a17dffa42c9dbbd7a0
parentefeb2ebd7e307224a735469ff89a3a6af4cf143b (diff)
event_size is currently never assigned to in mieqProcessInputEvents().
event_size is never assigned to in mieqProcessInputEvents(), so realloc() is always called. This is benign, but I'm guessing not intended. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Keith Packard <keithp@keithp.com> (cherry picked from commit da4eebe58ec81e2297cc1773af1fb622fb392bbd)
-rw-r--r--mi/mieq.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mi/mieq.c b/mi/mieq.c
index fa60b405b..d1441e285 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -439,7 +439,11 @@ mieqProcessInputEvents(void)
evlen = e->events->evlen;
if(evlen > event_size)
+ {
event = realloc(event, evlen);
+ event_size = evlen;
+ }
+
if (!event)
FatalError("[mi] No memory left for event processing.\n");