qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] qga: fix 'driver' leak in guest-get-fsinfo


From: Laszlo Ersek
Subject: Re: [Qemu-devel] [PATCH] qga: fix 'driver' leak in guest-get-fsinfo
Date: Thu, 5 Jul 2018 19:43:56 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

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 <address@hidden>
> ---
>  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 <address@hidden>

Laszlo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]