summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-04-21 10:32:40 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-04-21 10:32:40 +0900
commitefdca32fe8693dec46db8f3fbd912eadd6217dec (patch)
treee304c3fd8a788b989e8f2d50487aebb4a6afb83a
parent39bbfc30300d4d1368f00bb64162de9493e7d1ba (diff)
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
-rw-r--r--src/lib/ecore_x/xlib/ecore_x_events.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/ecore_x/xlib/ecore_x_events.c b/src/lib/ecore_x/xlib/ecore_x_events.c
index 25d8fa21d6..8ab79a4582 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,
291 int i; 291 int i;
292 292
293 e = malloc(sizeof(Ecore_Event_Axis_Update)); 293 e = malloc(sizeof(Ecore_Event_Axis_Update));
294 if (!e) return; 294 if (!e)
295 {
296 if (axis) free(axis);
297 return;
298 }
295 299
296 e->window = window; 300 e->window = window;
297 e->event_window = event_window; 301 e->event_window = event_window;