Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85de3d9b authored by Amit Choudhary's avatar Amit Choudhary Committed by David Woodhouse
Browse files

[JFFS2] Fix error-path leak in summary scan

parent aba54da3
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -130,6 +130,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
	if (jffs2_sum_active()) {
	if (jffs2_sum_active()) {
		s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
		s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
		if (!s) {
		if (!s) {
			kfree(flashbuf);
			JFFS2_WARNING("Can't allocate memory for summary\n");
			JFFS2_WARNING("Can't allocate memory for summary\n");
			return -ENOMEM;
			return -ENOMEM;
		}
		}