lkml.org 
[lkml]   [2020]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] mtd-ram: correctly free memory on error path in platram_probe()
Date
On Fri, 2020-11-13 at 16:05:37 UTC, Baskov Evgeiny wrote:
> If an error happens in mtd_device_parse_register or mtd_device_register,
> memory allocated for struct platram_info is leaked.
>
> Make platram_probe() call platram_remove() on all error paths
> after struct platram_info allocation to correctly free resources.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Baskov Evgeiny <baskov@ispras.ru>

Applied to https://git.kernel.org/pub/scm/linux/kernel/git/mtd/linux.git nand/next, thanks.

Miquel

\
 
 \ /
  Last update: 2020-11-19 22:07    [W:0.032 / U:0.276 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site