eina_inline: Fixed a potential dangling pointer
Summary: fixed by null handling Test Plan: N/A Reviewers: Hermet, YOhoho, cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10850
This commit is contained in:
parent
271b56889f
commit
ab67611c65
|
@ -150,7 +150,11 @@ eina_value_flush(Eina_Value *value)
|
|||
}
|
||||
else if (type == EINA_VALUE_TYPE_STRING)
|
||||
{
|
||||
if (value->value.ptr) free(value->value.ptr);
|
||||
if (value->value.ptr)
|
||||
{
|
||||
free(value->value.ptr);
|
||||
value->value.ptr = NULL;
|
||||
}
|
||||
}
|
||||
else if (type->value_size > 8)
|
||||
eina_value_inner_free(type->value_size, mem);
|
||||
|
|
Loading…
Reference in New Issue