Change the behavior of create_function_list to be consistent.

This commit is contained in:
Danila Fedorin 2018-05-14 20:15:03 -07:00
parent e7f3a9384e
commit b96d1804aa
1 changed files with 3 additions and 3 deletions

View File

@ -264,16 +264,16 @@ libab_result libab_create_function_list(libab_ref* into, libab_ref* type) {
}
if(result == LIBAB_SUCCESS) {
result = libab_create_value_raw(into, list, type);
result = libab_ref_new(into, list,
((libab_parsetype*) libab_ref_get(type))->data_u.base->free_function);
if(result != LIBAB_SUCCESS) {
libab_function_list_free(list);
libab_ref_free(into);
}
}
if(result != LIBAB_SUCCESS) {
free(list);
libab_ref_null(into);
free(list);
}
return result;