forked from enlightenment/efl
edje_embryo: fix null pointer dereference in ALLOC_COPY_DESC
To fix null pointer dereference in ALLOC_COPY_DESC, allocated variable "new" is checked.
This commit is contained in:
parent
6f981794ad
commit
9dde786ffe
|
@ -2102,6 +2102,7 @@ case EDJE_PART_TYPE_##Short: \
|
|||
Edje_Part_Description_##Type * new; \
|
||||
tmp = (Edje_Part_Description_##Type *)parent; \
|
||||
new = calloc(1, sizeof (Edje_Part_Description_##Type)); \
|
||||
if (!new) break; \
|
||||
new->Spec = tmp->Spec; \
|
||||
To = &new->common; \
|
||||
break; \
|
||||
|
|
Loading…
Reference in New Issue