summaryrefslogtreecommitdiffstats
path: root/fs/isofs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-06-08 10:30:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-06-18 07:25:42 -0700
commitc11760c6d80ab6aa20e383cf378a7287305f591c (patch)
tree91f5c65f5b1bf57bba5774c87767f93549f6bec5 /fs/isofs
parenta6c0a392622702fc9f47ddcea5684414d44a5d3b (diff)
downloadop-kernel-dev-c11760c6d80ab6aa20e383cf378a7287305f591c.zip
op-kernel-dev-c11760c6d80ab6aa20e383cf378a7287305f591c.tar.gz
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>
Diffstat (limited to 'fs/isofs')
-rw-r--r--fs/isofs/inode.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index 3db5ba4..b3cc858 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -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);
OpenPOWER on IntegriCloud