summaryrefslogtreecommitdiffstats
path: root/fs/isofs/namei.c
diff options
context:
space:
mode:
authorPan Bian <bianpan2016@163.com>2021-01-18 04:04:55 -0800
committerJan Kara <jack@suse.cz>2021-01-25 17:57:38 +0100
commit0a6dc67a6aa45f19bd4ff89b4f468fc50c4b8daa (patch)
treeb8095213185363a9af692eb5ff78ee0f468704a4 /fs/isofs/namei.c
parenta4db1072e1a3bd7a8d9c356e1902b13ac5deb8ef (diff)
downloadlinux-0a6dc67a6aa45f19bd4ff89b4f468fc50c4b8daa.tar.gz
linux-0a6dc67a6aa45f19bd4ff89b4f468fc50c4b8daa.tar.bz2
linux-0a6dc67a6aa45f19bd4ff89b4f468fc50c4b8daa.zip
isofs: release buffer head before return
Release the buffer_head before returning error code in do_isofs_readdir() and isofs_find_entry(). Fixes: 2deb1acc653c ("isofs: fix access to unallocated memory when reading corrupted filesystem") Link: https://lore.kernel.org/r/20210118120455.118955-1-bianpan2016@163.com Signed-off-by: Pan Bian <bianpan2016@163.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/isofs/namei.c')
-rw-r--r--fs/isofs/namei.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/isofs/namei.c b/fs/isofs/namei.c
index 402769881c32..58f80e1b3ac0 100644
--- a/fs/isofs/namei.c
+++ b/fs/isofs/namei.c
@@ -102,6 +102,7 @@ isofs_find_entry(struct inode *dir, struct dentry *dentry,
printk(KERN_NOTICE "iso9660: Corrupted directory entry"
" in block %lu of inode %lu\n", block,
dir->i_ino);
+ brelse(bh);
return 0;
}