aboutsummaryrefslogtreecommitdiff
path: root/tests/migration-test.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2017-10-30 14:27:40 +0100
committerJuan Quintela <quintela@redhat.com>2018-01-15 12:47:57 +0100
commit9c43435dc1f872a1452792fd8d9dbcf5c0482e46 (patch)
tree6029d8616eba94cc04d873d8d11e8ca6b9c2bd77 /tests/migration-test.c
parent2e3c8f8dbddf2992e29533ded845640d109d77f3 (diff)
migration: free result string
Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reported-by: Peter Xu <peterx@redhat.com>
Diffstat (limited to 'tests/migration-test.c')
-rw-r--r--tests/migration-test.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/migration-test.c b/tests/migration-test.c
index be598d3257..799e24ebc6 100644
--- a/tests/migration-test.c
+++ b/tests/migration-test.c
@@ -358,13 +358,14 @@ static void migrate_check_parameter(QTestState *who, const char *parameter,
const char *value)
{
QDict *rsp, *rsp_return;
- const char *result;
+ char *result;
rsp = wait_command(who, "{ 'execute': 'query-migrate-parameters' }");
rsp_return = qdict_get_qdict(rsp, "return");
result = g_strdup_printf("%" PRId64,
qdict_get_try_int(rsp_return, parameter, -1));
g_assert_cmpstr(result, ==, value);
+ g_free(result);
QDECREF(rsp);
}