From efdca32fe8693dec46db8f3fbd912eadd6217dec Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 21 Apr 2015 10:32:40 +0900 Subject: [PATCH] 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; -- 2.7.4