From fd58c1c3e5a976a0d862b8ebd243d3505d33d19a Mon Sep 17 00:00:00 2001 From: Minkyu Kang Date: Thu, 17 Sep 2015 16:44:09 +0900 Subject: [PATCH] ctxpopup: delete objects when failed to create Change-Id: I826110d2c8dd3f3f725b094c27b024009d104cf7 Signed-off-by: Minkyu Kang --- src/util/ctxpopup.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/util/ctxpopup.c b/src/util/ctxpopup.c index 34ded20..c70f808 100644 --- a/src/util/ctxpopup.c +++ b/src/util/ctxpopup.c @@ -148,6 +148,8 @@ struct ctxpopup *ctxpopup_create(Evas_Object *base, const char *ctxpopup_style, box = util_add_box(ctxpopup, EINA_FALSE); if (!box) { _ERR("failed to add box"); + evas_object_del(ctxpopup); + free(m); return false; } @@ -158,6 +160,7 @@ struct ctxpopup *ctxpopup_create(Evas_Object *base, const char *ctxpopup_style, if (!btn) { _ERR("failed to add button"); evas_object_del(ctxpopup); + free(m); return false; } -- 2.7.4