Skip to content

Commit bd89c3a

Browse files
author
chenglong
committed
fix(object): memory leak for tests
1 parent 4ae0dd6 commit bd89c3a

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

tests/test_qom.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ int main(void)
158158

159159
assert(backend->parent_obj.size == 2ULL * 1024 * 1024 * 1024);
160160
assert(!strcmp(backend->parent_obj.swap_storage, "file:///swap"));
161+
object_free(root);
161162

163+
// ===============
162164
error_clear(&err);
163165

164166
Object *lifecycle_object;
@@ -178,6 +180,6 @@ int main(void)
178180
assert(!object_is_realized(lifecycle_object));
179181
assert(!strcmp(lifecycle_events, "cp"));
180182

181-
object_free(root);
183+
object_free(lifecycle_object);
182184
return 0;
183185
}

0 commit comments

Comments
 (0)