raster pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=efdca32fe8693dec46db8f3fbd912eadd6217dec

commit efdca32fe8693dec46db8f3fbd912eadd6217dec
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Apr 21 10:32:40 2015 +0900

    ecore_x - axis events - if event struct alloc fails, free axis data
    
    this frees the axis data coming in if struct alloc fails - should
    basically never happen, but if it does we don't lose axis data as
    caller asumes this data will be freed in the event
    
    related to CID 1256115
---
 src/lib/ecore_x/xlib/ecore_x_events.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_x/xlib/ecore_x_events.c 
b/src/lib/ecore_x/xlib/ecore_x_events.c
index 25d8fa2..8ab79a4 100644
--- a/src/lib/ecore_x/xlib/ecore_x_events.c
+++ b/src/lib/ecore_x/xlib/ecore_x_events.c
@@ -291,7 +291,11 @@ _ecore_x_axis_update(Ecore_Window window,
    int i;
 
    e = malloc(sizeof(Ecore_Event_Axis_Update));
-   if (!e) return;
+   if (!e)
+     {
+        if (axis) free(axis);
+        return;
+     }
 
    e->window = window;
    e->event_window = event_window;

-- 


Reply via email to