Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ubifs: Fix memory leak in read_znode() error path
In read_znode(), the indexing node 'idx' is allocated by kmalloc(). However, it is not deallocated in the following execution if ubifs_node_check_hash() fails, leading to a memory leak bug. To fix this issue, free 'idx' before returning the error. Fixes: 16a26b2 ("ubifs: authentication: Add hashes to index nodes") Signed-off-by: Wenwen Wang <[email protected]> Signed-off-by: Richard Weinberger <[email protected]>
- Loading branch information