diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-08 13:30:03 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-06-18 10:25:42 -0400 |
commit | c11760c6d80ab6aa20e383cf378a7287305f591c (patch) | |
tree | 91f5c65f5b1bf57bba5774c87767f93549f6bec5 | |
parent | a6c0a392622702fc9f47ddcea5684414d44a5d3b (diff) |
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>
-rw-r--r-- | fs/isofs/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c index 3db5ba4568fc..b3cc8586984e 100644 --- a/fs/isofs/inode.c +++ b/fs/isofs/inode.c | |||
@@ -974,7 +974,7 @@ out_no_inode: | |||
974 | out_no_read: | 974 | out_no_read: |
975 | printk(KERN_WARNING "%s: bread failed, dev=%s, iso_blknum=%d, block=%d\n", | 975 | printk(KERN_WARNING "%s: bread failed, dev=%s, iso_blknum=%d, block=%d\n", |
976 | __func__, s->s_id, iso_blknum, block); | 976 | __func__, s->s_id, iso_blknum, block); |
977 | goto out_freesbi; | 977 | goto out_freebh; |
978 | out_bad_zone_size: | 978 | out_bad_zone_size: |
979 | printk(KERN_WARNING "ISOFS: Bad logical zone size %ld\n", | 979 | printk(KERN_WARNING "ISOFS: Bad logical zone size %ld\n", |
980 | sbi->s_log_zone_size); | 980 | sbi->s_log_zone_size); |
@@ -989,6 +989,7 @@ out_unknown_format: | |||
989 | 989 | ||
990 | out_freebh: | 990 | out_freebh: |
991 | brelse(bh); | 991 | brelse(bh); |
992 | brelse(pri_bh); | ||
992 | out_freesbi: | 993 | out_freesbi: |
993 | kfree(opt.iocharset); | 994 | kfree(opt.iocharset); |
994 | kfree(sbi); | 995 | kfree(sbi); |