forked from enlightenment/efl
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
This commit is contained in:
parent
c89bf7b2d8
commit
82f0be9a32
|
@ -770,7 +770,8 @@ _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));
|
||||
if (ep->param2)
|
||||
memset(ep->param2, 0, sizeof(Edje_Real_Part_State));
|
||||
}
|
||||
else if (ep->part->type == EDJE_PART_TYPE_EXTERNAL)
|
||||
{
|
||||
|
@ -779,7 +780,8 @@ _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;
|
||||
if (ep->param2)
|
||||
ep->param2->external_params = NULL;
|
||||
}
|
||||
else
|
||||
if (ep->param2)
|
||||
|
|
Loading…
Reference in New Issue