From: "Dr. David Alan Gilbert" <dgilbert@redhat.com>
To: Li Zhijian <lizhijian@cn.fujitsu.com>
Cc: qemu-devel@nongnu.org, quintela@redhat.com
Subject: Re: [PATCH RESEND 2/4] migration/rdma: Fix rdma_addrinfo res leaks
Date: Mon, 24 May 2021 20:03:51 +0100 [thread overview]
Message-ID: <YKv4lxNnb8ssrpHR@work-vm> (raw)
In-Reply-To: <20210520081148.17001-2-lizhijian@cn.fujitsu.com>
* Li Zhijian (lizhijian@cn.fujitsu.com) wrote:
> rdma_freeaddrinfo() is the reverse operation of rdma_getaddrinfo()
>
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
That call seems entirely undocumented, but looks like it's been there at
least 10 years.
> ---
> migration/rdma.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/migration/rdma.c b/migration/rdma.c
> index 7e7595faab..651534e825 100644
> --- a/migration/rdma.c
> +++ b/migration/rdma.c
> @@ -987,10 +987,12 @@ static int qemu_rdma_resolve_host(RDMAContext *rdma, Error **errp)
> }
> }
>
> + rdma_freeaddrinfo(res);
> ERROR(errp, "could not resolve address %s", rdma->host);
> goto err_resolve_get_addr;
>
> route:
> + rdma_freeaddrinfo(res);
> qemu_rdma_dump_gid("source_resolve_addr", rdma->cm_id);
>
> ret = rdma_get_cm_event(rdma->channel, &cm_event);
> @@ -2593,6 +2595,7 @@ static int qemu_rdma_dest_init(RDMAContext *rdma, Error **errp)
> break;
> }
>
> + rdma_freeaddrinfo(res);
> if (!e) {
> ERROR(errp, "Error: could not rdma_bind_addr!");
> goto err_dest_init_bind_addr;
> --
> 2.30.2
>
>
>
--
Dr. David Alan Gilbert / dgilbert@redhat.com / Manchester, UK
next prev parent reply other threads:[~2021-05-24 19:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-20 8:11 [PATCH RESEND 1/4] migration/rdma: cleanup rmda in rdma_start_incoming_migration error path Li Zhijian
2021-05-20 8:11 ` [PATCH RESEND 2/4] migration/rdma: Fix rdma_addrinfo res leaks Li Zhijian
2021-05-24 19:03 ` Dr. David Alan Gilbert [this message]
2021-05-20 8:11 ` [PATCH RESEND 3/4] migration/rdma: destination: create the return patch after the first accept Li Zhijian
2021-05-20 8:30 ` lizhijian
2021-05-24 19:08 ` Dr. David Alan Gilbert
2021-05-20 8:11 ` [PATCH RESEND 4/4] migration/rdma: source: get accept cm_event from return path in non-block mode Li Zhijian
2021-05-24 19:06 ` [PATCH RESEND 1/4] migration/rdma: cleanup rmda in rdma_start_incoming_migration error path Dr. David Alan Gilbert
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=YKv4lxNnb8ssrpHR@work-vm \
--to=dgilbert@redhat.com \
--cc=lizhijian@cn.fujitsu.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.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).