Searched hist:"6 a379f67" (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/fs/jffs2/ |
H A D | scan.c | 6a379f67 Mon Aug 19 16:55:04 CDT 2019 Wenwen Wang <wenwen@cs.uga.edu> jffs2: Fix memory leak in jffs2_scan_eraseblock() error path
In jffs2_scan_eraseblock(), 'sumptr' is allocated through kmalloc() if 'sumlen' is larger than 'buf_size'. However, it is not deallocated in the following execution if jffs2_fill_scan_buf() fails, leading to a memory leak bug. To fix this issue, free 'sumptr' before returning the error.
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu> Signed-off-by: Richard Weinberger <richard@nod.at> 6a379f67 Mon Aug 19 16:55:04 CDT 2019 Wenwen Wang <wenwen@cs.uga.edu> jffs2: Fix memory leak in jffs2_scan_eraseblock() error path In jffs2_scan_eraseblock(), 'sumptr' is allocated through kmalloc() if 'sumlen' is larger than 'buf_size'. However, it is not deallocated in the following execution if jffs2_fill_scan_buf() fails, leading to a memory leak bug. To fix this issue, free 'sumptr' before returning the error. Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu> Signed-off-by: Richard Weinberger <richard@nod.at>
|