[PATCH] event_size is currently never assigned to in mieqProcessInputEvents().

Jon TURNEY jon.turney at dronecode.org.uk
Wed Oct 13 09:34:31 PDT 2010


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 at dronecode.org.uk>
Reviewed-by: Keith Packard <keithp at keithp.com>
---
 mi/mieq.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/mi/mieq.c b/mi/mieq.c
index fa60b40..d1441e2 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");
-- 
1.7.2.3



More information about the xorg-devel mailing list