From: Li Qiang <liq3ea@gmail.com>
To: Alex Chen <alex.chen@huawei.com>
Cc: qemu-trivial@nongnu.org,
zhanghailiang <zhang.zhanghailiang@huawei.com>,
Gerd Hoffmann <kraxel@redhat.com>,
Qemu Developers <qemu-devel@nongnu.org>
Subject: Re: [PATCH] vnc: Fix a memleak in vnc_display_connect()
Date: Thu, 26 Nov 2020 18:32:07 +0800 [thread overview]
Message-ID: <CAKXe6SKKqHAwbOHQzy3ZviQKrotFWKJ3h2Gtm0Aw1nk++3+eWw@mail.gmail.com> (raw)
In-Reply-To: <20201126065702.35095-1-alex.chen@huawei.com>
Alex Chen <alex.chen@huawei.com> 于2020年11月26日周四 下午3:10写道:
>
> Free the 'sioc' when the qio_channel_socket_connect_sync() fails.
>
> Reported-by: Euler Robot <euler.robot@huawei.com>
> Signed-off-by: Alex Chen <alex.chen@huawei.com>
Reviewed-by: Li Qiang <liq3ea@gmail.com>
> ---
> ui/vnc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/ui/vnc.c b/ui/vnc.c
> index 49235056f7..dae56e9493 100644
> --- a/ui/vnc.c
> +++ b/ui/vnc.c
> @@ -3743,6 +3743,7 @@ static int vnc_display_connect(VncDisplay *vd,
> sioc = qio_channel_socket_new();
> qio_channel_set_name(QIO_CHANNEL(sioc), "vnc-reverse");
> if (qio_channel_socket_connect_sync(sioc, saddr[0], errp) < 0) {
> + object_unref(OBJECT(sioc));
> return -1;
> }
> vnc_connect(vd, sioc, false, false);
> --
> 2.19.1
>
>
next prev parent reply other threads:[~2020-11-26 10:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-26 6:57 [PATCH] vnc: Fix a memleak in vnc_display_connect() Alex Chen
2020-11-26 10:32 ` Li Qiang [this message]
2021-01-12 19:49 ` Laurent Vivier
2021-01-12 19:56 ` Laurent Vivier
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=CAKXe6SKKqHAwbOHQzy3ZviQKrotFWKJ3h2Gtm0Aw1nk++3+eWw@mail.gmail.com \
--to=liq3ea@gmail.com \
--cc=alex.chen@huawei.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-trivial@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).