projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af18e35
)
ext4: fix buffer leak in ext4_xattr_get_block() on error path
author
Vasily Averin
<vvs@virtuozzo.com>
Wed, 7 Nov 2018 16:01:33 +0000
(11:01 -0500)
committer
Theodore Ts'o
<tytso@mit.edu>
Wed, 7 Nov 2018 16:01:33 +0000
(11:01 -0500)
Fixes: dec214d00e0d ("ext4: xattr inode deduplication")
Signed-off-by: Vasily Averin <vvs@virtuozzo.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org # 4.13
fs/ext4/xattr.c
patch
|
blob
|
history
diff --git
a/fs/ext4/xattr.c
b/fs/ext4/xattr.c
index dc1aeab06dbade6769914ad7d5292935134633b1..07c3a115f7ae9afc7de3338d0d27922c7c53ccff 100644
(file)
--- a/
fs/ext4/xattr.c
+++ b/
fs/ext4/xattr.c
@@
-2272,8
+2272,10
@@
static struct buffer_head *ext4_xattr_get_block(struct inode *inode)
if (!bh)
return ERR_PTR(-EIO);
error = ext4_xattr_check_block(inode, bh);
- if (error)
+ if (error) {
+ brelse(bh);
return ERR_PTR(error);
+ }
return bh;
}