tests: fix memleak in error path test for input visitor

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>
This commit is contained in:
Wenchao Xia 2013-11-06 02:35:51 +08:00 committed by Anthony Liguori
parent 3dce9cad5a
commit 8aa15b6e52

View 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);
}