提交 94182167 编写于 作者: W Wei Yongjun 提交者: Namjae Jeon

exfat: fix possible memory leak in exfat_find()

'es' is malloced from exfat_get_dentry_set() in exfat_find() and should
be freed before leaving from the error handling cases, otherwise it will
cause memory leak.

Fixes: 5f2aa075 ("exfat: add inode operations")
Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: NNamjae Jeon <namjae.jeon@samsung.com>
上级 03577948
......@@ -692,6 +692,7 @@ static int exfat_find(struct inode *dir, struct qstr *qname,
exfat_fs_error(sb,
"non-zero size file starts with zero cluster (size : %llu, p_dir : %u, entry : 0x%08x)",
i_size_read(dir), ei->dir.dir, ei->entry);
kfree(es);
return -EIO;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册