Skip to content

Commit

Permalink
jffs2: fix another potential leak on error path in scan.c
Browse files Browse the repository at this point in the history
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
David Woodhouse authored and David Woodhouse committed Jun 23, 2009
1 parent ac1b7c3 commit 4839641
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/jffs2/scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,9 @@ int jffs2_scan_medium(struct jffs2_sb_info *c)
if (jffs2_sum_active()) {
s = kzalloc(sizeof(struct jffs2_summary), GFP_KERNEL);
if (!s) {
kfree(flashbuf);
JFFS2_WARNING("Can't allocate memory for summary\n");
return -ENOMEM;
ret = -ENOMEM;
goto out;
}
}

Expand Down

0 comments on commit 4839641

Please sign in to comment.