]> git.proxmox.com Git - mirror_qemu.git/blobdiff - tests/check-qom-interface.c
usb-mtp: fix return status of delete
[mirror_qemu.git] / tests / check-qom-interface.c
index 719ddcf2e046ce01ed97ef319951b8a2a52e67b6..2177f0dce5d2f45ac2e4615a22e28de6b918e7fe 100644 (file)
@@ -23,9 +23,7 @@
 #define TEST_IF(obj) \
      INTERFACE_CHECK(TestIf, (obj), TYPE_TEST_IF)
 
-typedef struct TestIf {
-    Object parent_obj;
-} TestIf;
+typedef struct TestIf TestIf;
 
 typedef struct TestIfClass {
     InterfaceClass parent_class;
@@ -76,6 +74,7 @@ static void test_interface_impl(const char *type)
 
     g_assert(iobj);
     g_assert(ioc->test == PATTERN);
+    object_unref(obj);
 }
 
 static void interface_direct_test(void)