From 2402f57cae496aab67b30035ac441f1e53d1d22a Mon Sep 17 00:00:00 2001 From: Wonki Kim Date: Wed, 13 Feb 2019 10:42:24 -0500 Subject: [PATCH] ecore_evas: fix a potentional deref after null problem Summary: this patch modify a logic to return after, failing to call eore_evas_buffer_allocfunc_new function. Reviewers: Hermet, bu5hm4n, cedric, devilhorns Reviewed By: devilhorns Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7918 Change-Id: I7a7d294b7fc023de052d03dcd7bc3ccf2e917c8a --- src/lib/ecore_evas/ecore_evas_buffer.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/ecore_evas/ecore_evas_buffer.c b/src/lib/ecore_evas/ecore_evas_buffer.c index 9672230..a20f115 100644 --- a/src/lib/ecore_evas/ecore_evas_buffer.c +++ b/src/lib/ecore_evas/ecore_evas_buffer.c @@ -900,7 +900,11 @@ ecore_evas_buffer_new(int w, int h) ecore_evas_buffer_allocfunc_new(w, h, _ecore_evas_buffer_pix_alloc, _ecore_evas_buffer_pix_free, NULL); - if (!ee) ecore_event_evas_shutdown(); + if (!ee) + { + ecore_event_evas_shutdown(); + return NULL; + } ecore_evas_done(ee, EINA_TRUE); -- 2.7.4