tests: check-qom-proplist: fix leak
authorMarc-André Lureau <marcandre.lureau@redhat.com>
Fri, 9 Jun 2017 13:33:37 +0000 (17:33 +0400)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 31 Jul 2017 10:05:49 +0000 (13:05 +0300)
user_creatable_add_opts() returns a reference (the other reference is
for the root parent/child link).

Leak introduced in commit a1af255f065cc.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
tests/check-qom-proplist.c

index 432b66585fea16c3f40a861e7cbc86def91b9102..c51e6e734dd7b8d270b12833986304aced28f3af 100644 (file)
@@ -428,6 +428,8 @@ static void test_dummy_createcmdl(void)
     g_assert(err == NULL);
     error_free(err);
 
+    object_unref(OBJECT(dobj));
+
     /*
      * cmdline-parsing via qemu_opts_parse() results in a QemuOpts entry
      * corresponding to the Object's ID to be added to the QemuOptsList