From: Thomas Huth <thuth@redhat.com>
To: pannengyuan@huawei.com, lvivier@redhat.com, pbonzini@redhat.com
Cc: zhang.zhanghailiang@huawei.com, qemu-devel@nongnu.org
Subject: Re: [PATCH V2] vhost-user-test: fix a memory leak
Date: Sun, 12 Jan 2020 11:39:51 +0100 [thread overview]
Message-ID: <3312978e-2bff-091a-b618-d9183b8c7252@redhat.com> (raw)
In-Reply-To: <072970b5-b7cc-ad71-d3e4-933e888b7093@redhat.com>
On 10/01/2020 15.07, Thomas Huth wrote:
> On 20/12/2019 02.26, pannengyuan@huawei.com wrote:
>> From: Pan Nengyuan <pannengyuan@huawei.com>
>>
>> Spotted by ASAN.
>>
>> Reported-by: Euler Robot <euler.robot@huawei.com>
>> Signed-off-by: Pan Nengyuan <pannengyuan@huawei.com>
>> ---
>> Changes V2 to V1:
>> - use a "goto cleanup", instead of duplicating the "free" functions.
>> - free "dest_cmdline" at the end.
>> ---
>> tests/vhost-user-test.c | 5 ++++-
>> 1 file changed, 4 insertions(+), 1 deletion(-)
>>
>> diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c
>> index 91ea373..dcb8617 100644
>> --- a/tests/vhost-user-test.c
>> +++ b/tests/vhost-user-test.c
>> @@ -717,7 +717,7 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
>> guint64 size;
>>
>> if (!wait_for_fds(s)) {
>> - return;
>> + goto cleanup;
>> }
>>
>> size = get_log_size(s);
>> @@ -776,8 +776,11 @@ static void test_migrate(void *obj, void *arg, QGuestAllocator *alloc)
>> g_source_unref(source);
>>
>> qtest_quit(to);
>> +
>> + cleanup:
>> test_server_free(dest);
>> g_free(uri);
>> + g_string_free(dest_cmdline, true);
>> }
>>
>> static void wait_for_rings_started(TestServer *s, size_t count)
>>
>
> Reviewed-by: Thomas Huth <thuth@redhat.com>
>
> ... and picked up to my qtest-next tree.
... and now I had to unqueue the patch again. It is reproducibly causing
one of the gitlab CI pipelines to fail with a timeout, e.g.:
https://gitlab.com/huth/qemu/-/jobs/400101552
Not sure what is going on here, though, there is no obvious error
message in the output... this needs some more investigation... do you
have a gitlab account and could have a look?
Thomas
next prev parent reply other threads:[~2020-01-12 10:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-20 1:26 [PATCH V2] vhost-user-test: fix a memory leak pannengyuan
2020-01-10 14:07 ` Thomas Huth
2020-01-12 10:39 ` Thomas Huth [this message]
2020-01-13 2:32 ` Pan Nengyuan
2020-01-15 3:10 ` Pan Nengyuan
2020-01-15 9:13 ` Thomas Huth
2020-01-16 13:29 ` Thomas Huth
2020-01-17 0:44 ` Pan Nengyuan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3312978e-2bff-091a-b618-d9183b8c7252@redhat.com \
--to=thuth@redhat.com \
--cc=lvivier@redhat.com \
--cc=pannengyuan@huawei.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=zhang.zhanghailiang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).