We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d051cef commit 9cdd312Copy full SHA for 9cdd312
fs/jffs2/scan.c
@@ -136,7 +136,7 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
136
if (!s) {
137
JFFS2_WARNING("Can't allocate memory for summary\n");
138
ret = -ENOMEM;
139
- goto out;
+ goto out_buf;
140
}
141
142
@@ -275,13 +275,15 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
275
276
ret = 0;
277
out:
278
+ jffs2_sum_reset_collected(s);
279
+ kfree(s);
280
+ out_buf:
281
if (buf_size)
282
kfree(flashbuf);
283
#ifndef __ECOS
284
else
285
mtd_unpoint(c->mtd, 0, c->mtd->size);
286
#endif
- kfree(s);
287
return ret;
288
289
0 commit comments