pinctrl: fix a memleak when freeing maps
We forgot to free the node itself when free:ing a map. Reported-by: xulinuxkernel <xulinuxkernel@gmail.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
8cb440ab70
commit
db6c2c69c2
@ -1193,6 +1193,7 @@ void pinctrl_unregister_map(struct pinctrl_map const *map)
|
||||
list_for_each_entry(maps_node, &pinctrl_maps, node) {
|
||||
if (maps_node->maps == map) {
|
||||
list_del(&maps_node->node);
|
||||
kfree(maps_node);
|
||||
mutex_unlock(&pinctrl_maps_mutex);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user