original_kernel/fs/ntfs3
Dan Carpenter b8155e95de
fs/ntfs3: Fix error handling in indx_insert_into_root()
There are three bugs in this code:
1) If indx_get_root() fails, then return -EINVAL instead of success.
2) On the "/* make root external */" -EOPNOTSUPP; error path it should
   free "re" but it has a memory leak.
3) If indx_new() fails then it will lead to an error pointer dereference
   when we call put_indx_node().

I've re-written the error handling to be more clear.

Fixes: 82cae269cf ("fs/ntfs3: Add initialization of super block")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Kari Argillander <kari.argillander@gmail.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
2021-08-27 17:05:14 +03:00
..
lib
Kconfig
Makefile
attrib.c
attrlist.c
bitfunc.c
bitmap.c
debug.h
dir.c
file.c
frecord.c
fslog.c
fsntfs.c
index.c fs/ntfs3: Fix error handling in indx_insert_into_root() 2021-08-27 17:05:14 +03:00
inode.c
lznt.c
namei.c
ntfs.h
ntfs_fs.h
record.c
run.c
super.c
upcase.c
xattr.c