]> xenbits.xensource.com Git - qemu-upstream-4.6-testing.git/commitdiff
tests: fix memleak in error path test for input visitor
authorWenchao Xia <xiawenc@linux.vnet.ibm.com>
Tue, 5 Nov 2013 18:35:51 +0000 (02:35 +0800)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Wed, 4 Dec 2013 00:07:32 +0000 (18:07 -0600)
Signed-off-by: Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1383676551-18806-3-git-send-email-xiawenc@linux.vnet.ibm.com
Cc: qemu-stable@nongnu.org
Signed-off-by: Anthony Liguori <aliguori@amazon.com>
(cherry picked from commit 8aa15b6e527f234e491a6d354bed4d10da3a01a7)

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
tests/test-qmp-input-visitor.c

index 0beb8fbfd2d91b95b45eeec31de05d3a6a86ae6e..1e1c6fa0c27bb5c64e7fef9398da0d2b15673450 100644 (file)
@@ -604,6 +604,7 @@ static void test_visitor_in_errors(TestInputVisitorData *data,
     g_assert(error_is_set(&errp));
     g_assert(p->string == NULL);
 
+    error_free(errp);
     g_free(p->string);
     g_free(p);
 }