mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
isofs: fix bh leak in isofs_fill_super() error case
In isofs_fill_super(), when an iso_primary_descriptor is found, it is kept in pri_bh. The error cases don't properly release it. Fix it. Reported-and-tested-by: 김원석 <stanley.will.kim@gmail.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
a6c0a39262
commit
c11760c6d8
@ -974,7 +974,7 @@ out_no_inode:
|
||||
out_no_read:
|
||||
printk(KERN_WARNING "%s: bread failed, dev=%s, iso_blknum=%d, block=%d\n",
|
||||
__func__, s->s_id, iso_blknum, block);
|
||||
goto out_freesbi;
|
||||
goto out_freebh;
|
||||
out_bad_zone_size:
|
||||
printk(KERN_WARNING "ISOFS: Bad logical zone size %ld\n",
|
||||
sbi->s_log_zone_size);
|
||||
@ -989,6 +989,7 @@ out_unknown_format:
|
||||
|
||||
out_freebh:
|
||||
brelse(bh);
|
||||
brelse(pri_bh);
|
||||
out_freesbi:
|
||||
kfree(opt.iocharset);
|
||||
kfree(sbi);
|
||||
|
Loading…
Reference in New Issue
Block a user