From: Laszlo Ersek <lersek@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@redhat.com>, qemu-devel@nongnu.org
Cc: mdroth@linux.vnet.ibm.com
Subject: Re: [Qemu-devel] [PATCH] qga: fix 'driver' leak in guest-get-fsinfo
Date: Thu, 5 Jul 2018 19:43:56 +0200 [thread overview]
Message-ID: <1e40fc1a-7b96-9244-ace8-bdf9d54a3891@redhat.com> (raw)
In-Reply-To: <20180705161629.13734-1-marcandre.lureau@redhat.com>
On 07/05/18 18:16, Marc-André Lureau wrote:
> 'driver' is leaked when the loop is not broken.
>
> Leak introduced by commit 743c71d03c20d64f2bae5fba6f26cdf5e4b1bda6,
> spotted by ASAN.
>
> Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
> ---
> qga/commands-posix.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/qga/commands-posix.c b/qga/commands-posix.c
> index 233f78a406..c46767b0dd 100644
> --- a/qga/commands-posix.c
> +++ b/qga/commands-posix.c
> @@ -890,6 +890,7 @@ static void build_guest_fsinfo_for_real_device(char const *syspath,
> break;
> }
>
> + g_free(driver);
> if (sscanf(p, "/%x:%x:%x.%x%n",
> pci, pci + 1, pci + 2, pci + 3, &pcilen) == 4) {
> p += pcilen;
>
Sorry, I should have noticed this in review.
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Laszlo
next prev parent reply other threads:[~2018-07-05 17:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-05 16:16 [Qemu-devel] [PATCH] qga: fix 'driver' leak in guest-get-fsinfo Marc-André Lureau
2018-07-05 17:43 ` Laszlo Ersek [this message]
2018-07-06 13:21 ` Michael Roth
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=1e40fc1a-7b96-9244-ace8-bdf9d54a3891@redhat.com \
--to=lersek@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mdroth@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/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).