edje: checking the return value of a function eina_mempool_malloc 59/128259/4
authorMinchul Lee <slotus.lee@samsung.com>
Mon, 8 May 2017 08:10:37 +0000 (17:10 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Mon, 8 May 2017 09:21:33 +0000 (09:21 +0000)
Change-Id: I1602b08f6d370c6a756300182ec8fb0aa8a5a70e
Signed-off-by: Minchul Lee <slotus.lee@samsung.com>
src/lib/edje/edje_calc.c

index ab253b9..02308cd 100644 (file)
@@ -749,7 +749,10 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
           {
              ep->param2 = eina_mempool_malloc(_edje_real_part_state_mp,
                                               sizeof(Edje_Real_Part_State));
-             memset(ep->param2, 0, sizeof(Edje_Real_Part_State));
+//TIZEN_ONLY(20170508): null checking the return value of a function eina_mempool_malloc
+             if (ep->param2)
+//
+               memset(ep->param2, 0, sizeof(Edje_Real_Part_State));
              ep->param2->p.map = eina_cow_alloc(_edje_calc_params_map_cow);
 #ifdef HAVE_EPHYSICS
              ep->param2->p.physics = eina_cow_alloc(_edje_calc_params_physics_cow);
@@ -762,7 +765,10 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
                _edje_external_parsed_params_free(ep->typedata.swallow->swallowed_object,
                                                  ep->param2->external_params);
           }
-        ep->param2->external_params = NULL;
+//TIZEN_ONLY(20170508): null checking the return value of a function eina_mempool_malloc
+        if (ep->param2)
+//
+          ep->param2->external_params = NULL;
      }
    else
    if (ep->param2)