mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
jffs2: fix another potential leak on error path in scan.c
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
This commit is contained in:
parent
ac1b7c378e
commit
4839641333
1 changed files with 2 additions and 2 deletions
|
@ -130,9 +130,9 @@ 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;
|
ret = -ENOMEM;
|
||||||
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue