diff options
author | Wenwen Wang <wenwen@cs.uga.edu> | 2019-08-20 00:55:04 +0300 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2019-09-15 23:42:41 +0300 |
commit | 6a379f67454a3c740671ed6c7793b76ffecef50b (patch) | |
tree | 14307fd46d3435e8fb8164fad591f5f4f9dea740 /fs/jffs2/fs.c | |
parent | 61b875e88a04fd626e68c657400f237af8afa95e (diff) | |
download | linux-6a379f67454a3c740671ed6c7793b76ffecef50b.tar.xz |
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>
Diffstat (limited to 'fs/jffs2/fs.c')
0 files changed, 0 insertions, 0 deletions