From: Zhenyu Ye <yezhenyu2@huawei.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: xiexiangyou@huawei.com, qemu-devel@nongnu.org,
dgilbert@redhat.com, quintela@redhat.com
Subject: Re: [PATCH v1] migration: tls: unref creds after used
Date: Wed, 22 Jul 2020 11:38:16 +0800 [thread overview]
Message-ID: <c7b05334-0484-8bc5-7476-81adbce24fca@huawei.com> (raw)
In-Reply-To: <20200721115445.GG843362@redhat.com>
On 2020/7/21 19:54, Daniel P. Berrangé wrote:
> On Fri, Jul 17, 2020 at 05:19:43PM +0800, Zhenyu Ye wrote:
>> We add the reference of creds in migration_tls_get_creds(),
>> but there was no place to unref it. So the OBJECT(creds) will
>> never be freed and result in memory leak.
>>
>> Unref the creds after creating the tls-channel server/client.
>> ...
>>
>> +
>> +cleanup:
>> + object_unref(OBJECT(creds));
>> }
>
> Simpler to just change migration_tls_get_creds() to remove the
> object_ref() call, since we're fine to use the borrowed reference
> in these methods.
>
Thanks for your review. I have sent a new series since the current
title "unref creds after used" is no longer appropriate:
https://lore.kernel.org/qemu-devel/20200722033228.71-1-yezhenyu2@huawei.com/
Thanks,
Zhenyu
prev parent reply other threads:[~2020-07-22 3:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 9:19 [PATCH v1] migration: tls: unref creds after used Zhenyu Ye
2020-07-21 11:54 ` Daniel P. Berrangé
2020-07-22 3:38 ` Zhenyu Ye [this message]
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=c7b05334-0484-8bc5-7476-81adbce24fca@huawei.com \
--to=yezhenyu2@huawei.com \
--cc=berrange@redhat.com \
--cc=dgilbert@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
--cc=xiexiangyou@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).