[PATCH -next v2 0/2] jffs2: fix two memory leak when mount jffs2
From: Baokun Li
Date: Thu Jan 13 2022 - 02:37:45 EST
V1->V2:
In jffs2_scan_medium,
if s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
returns error, go to "out" to do clear. Null pointer dereference
occurs when if (s->sum_list_head) is executed in "out".
Baokun Li (2):
jffs2: fix memory leak in jffs2_do_mount_fs
jffs2: fix memory leak in jffs2_scan_medium
fs/jffs2/build.c | 4 +++-
fs/jffs2/scan.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
--
2.31.1