提交 db6c2c69 编写于 作者: L Linus Walleij

pinctrl: fix a memleak when freeing maps

We forgot to free the node itself when free:ing a map.
Reported-by: Nxulinuxkernel <xulinuxkernel@gmail.com>
Reviewed-by: NStephen Warren <swarren@nvidia.com>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 8cb440ab
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册