lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <be9e4adc-748b-cada-54df-a8d52515c3a8@huawei.com>
Date:   Mon, 27 Dec 2021 11:33:51 +0800
From:   He Ying <heying24@...wei.com>
To:     <mpe@...erman.id.au>, <benh@...nel.crashing.org>,
        <paulus@...ba.org>
CC:     <linuxppc-dev@...ts.ozlabs.org>, <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] powerpc/sysdev/of_rtc: Fix possible memory leak in
 of_instantiate_rtc

Ping. Any ideas about this patch?

在 2021/11/3 9:47, He Ying 写道:
> If of_address_to_resource() in of_instantiate_rtc() fails, previously
> allocated memory res is not freed. Add missing kfree() for it.
>
> Signed-off-by: He Ying <heying24@...wei.com>
> ---
>   arch/powerpc/sysdev/of_rtc.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/arch/powerpc/sysdev/of_rtc.c b/arch/powerpc/sysdev/of_rtc.c
> index 1f408d34a6a7..23b896996c2f 100644
> --- a/arch/powerpc/sysdev/of_rtc.c
> +++ b/arch/powerpc/sysdev/of_rtc.c
> @@ -44,6 +44,7 @@ void __init of_instantiate_rtc(void)
>   				printk(KERN_ERR "OF RTC: Error "
>   				       "translating resources for %pOF\n",
>   				       node);
> +				kfree(res);
>   				continue;
>   			}
>   

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ