mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next v2 0/2] jffs2: fix two memory leak when mount jffs2
@ 2022-01-13  7:48 Baokun Li
  2022-01-13  7:48 ` [PATCH -next v2 1/2] jffs2: fix memory leak in jffs2_do_mount_fs Baokun Li
  2022-01-13  7:48 ` [PATCH -next v2 2/2] jffs2: fix memory leak in jffs2_scan_medium Baokun Li
  0 siblings, 2 replies; 3+ messages in thread
From: Baokun Li @ 2022-01-13  7:48 UTC (permalink / raw)
  To: richard, dwmw2, linux-mtd, linux-kernel; +Cc: libaokun1, yukuai3

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-13  7:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13  7:48 [PATCH -next v2 0/2] jffs2: fix two memory leak when mount jffs2 Baokun Li
2022-01-13  7:48 ` [PATCH -next v2 1/2] jffs2: fix memory leak in jffs2_do_mount_fs Baokun Li
2022-01-13  7:48 ` [PATCH -next v2 2/2] jffs2: fix memory leak in jffs2_scan_medium Baokun Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®