]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemumonitorjsontest: do not leak qapiData.schema
authorJán Tomko <jtomko@redhat.com>
Fri, 21 Feb 2020 23:57:07 +0000 (00:57 +0100)
committerJán Tomko <jtomko@redhat.com>
Mon, 9 Mar 2020 14:46:43 +0000 (15:46 +0100)
Free the x86_64 schema before overwriting it with s390x schema.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Fixes: eee09435eec46553aac4fdf1c2d8f3214167bded
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
tests/qemumonitorjsontest.c

index c7049bcdf0ef0ce033c712f4994765e9a09affe6..9451c5de5b5be12717a91d1b692364e57fbbb5e3 100644 (file)
@@ -3371,6 +3371,7 @@ mymain(void)
 
 #undef DO_TEST_QUERY_JOBS
 
+    virHashFree(qapiData.schema);
     if (!(qapiData.schema = testQEMUSchemaLoad("s390x"))) {
         VIR_TEST_VERBOSE("failed to load qapi schema for s390x");
         ret = -1;