diff options
| author | Marc-André Lureau | 2018-01-04 17:05:16 +0100 |
|---|---|---|
| committer | Paolo Bonzini | 2018-01-16 14:54:50 +0100 |
| commit | 890241ab6942a0186eaf485dabf266a5a7aac428 (patch) | |
| tree | 0c68d01bec05027d2792f44821dc53844e5342f6 | |
| parent | readline: add a free function (diff) | |
| download | qemu-890241ab6942a0186eaf485dabf266a5a7aac428.tar.gz qemu-890241ab6942a0186eaf485dabf266a5a7aac428.tar.xz qemu-890241ab6942a0186eaf485dabf266a5a7aac428.zip | |
tests: fix migration-test leak
Direct leak of 12 byte(s) in 2 object(s) allocated from:
#0 0x7f50d403c850 in malloc (/lib64/libasan.so.4+0xde850)
#1 0x7f50d1ddf98f in vasprintf (/lib64/libc.so.6+0x8098f)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20180104160523.22995-12-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
| -rw-r--r-- | tests/migration-test.c | 3 |
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); } |
