ctxpopup: delete objects when failed to create 90/48290/1
authorMinkyu Kang <mk7.kang@samsung.com>
Thu, 17 Sep 2015 07:44:09 +0000 (16:44 +0900)
committerMinkyu Kang <mk7.kang@samsung.com>
Thu, 17 Sep 2015 07:44:09 +0000 (16:44 +0900)
Change-Id: I826110d2c8dd3f3f725b094c27b024009d104cf7
Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
src/util/ctxpopup.c

index 34ded20..c70f808 100644 (file)
@@ -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;
                }