[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] pc-bios/s390-ccw/net: fix a possible memory lea
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH] pc-bios/s390-ccw/net: fix a possible memory leak in get_uuid() |
Date: |
Wed, 14 Aug 2019 08:54:54 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 |
On 8/14/19 8:14 AM, address@hidden wrote:
> There is a possible memory leak in get_uuid(). Should free allocated mem
> before
> return NULL.
>
> Signed-off-by: Yifan Luo <address@hidden>
> ---
> pc-bios/s390-ccw/netmain.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/pc-bios/s390-ccw/netmain.c b/pc-bios/s390-ccw/netmain.c
> index f3542cb2cf1..f2dcc01e272 100644
> --- a/pc-bios/s390-ccw/netmain.c
> +++ b/pc-bios/s390-ccw/netmain.c
> @@ -269,6 +269,7 @@ static const char *get_uuid(void)
> : "d" (r0), "d" (r1), [addr] "a" (buf)
> : "cc", "memory");
> if (cc) {
> + free(mem);
> return NULL;
> }
>
>
Thanks, I queued the patch to my s390-ccw-bios branch.
Reviewed-by: Thomas Huth <address@hidden>