mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-28 12:53:14 +01:00
fs/ntfs3: Fix memory leak in indx_find_sort()
When popping a level from the index lookup stack, indx_find_sort() frees the struct indx_node but not the index buffer it owns. Every call that descends and then pops a level leaks that allocation. Free n->index before freeing the node itself. Signed-off-by: Konstantin Komarov <[email protected]>
This commit is contained in:
1 file changed
+1
@@ -1325,6 +1325,7 @@ pop_level:
|
||||
/* Pop one level. */
|
||||
if (n) {
|
||||
fnd_pop(fnd);
|
||||
kfree(n->index);
|
||||
kfree(n);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user