Free type after retrieving necessary information.
This commit is contained in:
parent
2f6176630f
commit
78d24de152
|
@ -9,9 +9,9 @@ void libab_value_init(libab_value* value, void* data, libab_ref* type) {
|
|||
void libab_value_free(libab_value* value) {
|
||||
void (*free_function)(void*);
|
||||
libab_parsetype* value_type;
|
||||
libab_ref_free(&value->type);
|
||||
value_type = libab_ref_get(&value->type);
|
||||
free_function = value_type->data_u.base->free_function;
|
||||
libab_ref_free(&value->type);
|
||||
if (free_function)
|
||||
free_function(value->data);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user