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:
Jaehyun Cho 2020-08-03 20:22:08 +09:00
parent 6f981794ad
commit 9dde786ffe
1 changed files with 1 additions and 0 deletions

View File

@ -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; \