summaryrefslogtreecommitdiff
path: root/src/lib/edje/edje_calc.c
diff options
context:
space:
mode:
authorMinchul Lee <slotus.lee@samsung.com>2017-05-08 15:39:21 +0200
committerStefan Schmidt <stefan@osg.samsung.com>2017-05-08 15:39:21 +0200
commit82f0be9a3217eb13d70b15c014f56009297d593b (patch)
treed6e06866ffbe12ebcbb32e6057cc9286f44f94a8 /src/lib/edje/edje_calc.c
parentc89bf7b2d89110f7203a4e4181265d141df3239a (diff)
edje: null checking the return value of a function eina_mempool_malloc
Summary: The return value of the function eina_mempool_malloc was dereferenced without checking. I added the checking code similar to the other codes. @fix Reviewers: raster, cedric, jpeg, herdsman, woohyun, stefan_schmidt Subscribers: stefan_schmidt Differential Revision: https://phab.enlightenment.org/D4855
Diffstat (limited to 'src/lib/edje/edje_calc.c')
-rw-r--r--src/lib/edje/edje_calc.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index 37163c3a14..ca3f851a1d 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -770,7 +770,8 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
770 { 770 {
771 ep->param2 = eina_mempool_malloc(_edje_real_part_state_mp, 771 ep->param2 = eina_mempool_malloc(_edje_real_part_state_mp,
772 sizeof(Edje_Real_Part_State)); 772 sizeof(Edje_Real_Part_State));
773 memset(ep->param2, 0, sizeof(Edje_Real_Part_State)); 773 if (ep->param2)
774 memset(ep->param2, 0, sizeof(Edje_Real_Part_State));
774 } 775 }
775 else if (ep->part->type == EDJE_PART_TYPE_EXTERNAL) 776 else if (ep->part->type == EDJE_PART_TYPE_EXTERNAL)
776 { 777 {
@@ -779,7 +780,8 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
779 _edje_external_parsed_params_free(ep->typedata.swallow->swallowed_object, 780 _edje_external_parsed_params_free(ep->typedata.swallow->swallowed_object,
780 ep->param2->external_params); 781 ep->param2->external_params);
781 } 782 }
782 ep->param2->external_params = NULL; 783 if (ep->param2)
784 ep->param2->external_params = NULL;
783 } 785 }
784 else 786 else
785 if (ep->param2) 787 if (ep->param2)