Avoid potential memory corruption
This commit is contained in:
parent
5f051980de
commit
98ac3ecd15
|
@ -71,6 +71,7 @@ Variable * variable_new(VariableType type, void const * value)
|
||||||
|
|
||||||
if((variable = object_new(sizeof(*variable))) == NULL)
|
if((variable = object_new(sizeof(*variable))) == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
variable->type = VT_NULL;
|
||||||
if(variable_set_from(variable, type, value) != 0)
|
if(variable_set_from(variable, type, value) != 0)
|
||||||
{
|
{
|
||||||
object_delete(variable);
|
object_delete(variable);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user