On Tue, 5 Jan 2021 14:42:29 +0300, Dan Carpenter wrote:
> This code will leak "map->debugfs_name" because the if statement is
> reversed so it only frees NULL pointers instead of non-NULL. In
> fact the if statement is not required and should just be removed
> because kfree() accepts NULL pointers
This code will leak "map->debugfs_name" because the if statement is
reversed so it only frees NULL pointers instead of non-NULL. In
fact the if statement is not required and should just be removed
because kfree() accepts NULL pointers.
Fixes: cffa4b2122f5 ("regmap: debugfs: Fix a memory leak when
2 matches
Mail list logo