fix memory leak in object_default

This commit is contained in:
lixianjing 2021-09-14 09:29:50 +08:00
parent b21b5df9a1
commit 02874c1366

View File

@ -48,7 +48,10 @@ ret_t object_default_clear_props(object_t* obj) {
}
static ret_t object_default_on_destroy(object_t* obj) {
return object_default_clear_props(obj);
object_default_t* o = OBJECT_DEFAULT(obj);
return_value_if_fail(o != NULL, RET_BAD_PARAMS);
return darray_deinit(&(o->props));
}
static int32_t object_default_compare(object_t* obj, object_t* other) {