aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl/core.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-07-22 19:43:20 -0400
committerLinus Walleij <linus.walleij@linaro.org>2013-07-25 11:18:36 -0400
commitdb6c2c69c27f2c4fd1e2a1c6b0b1119b1e885f8a (patch)
treeeb061ca9a8c5fe4ccd0043b7a6f0fb8e5d1eff96 /drivers/pinctrl/core.c
parent8cb440ab709fb1f7e3f71a6159ebab9403760472 (diff)
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>
Diffstat (limited to 'drivers/pinctrl/core.c')
-rw-r--r--drivers/pinctrl/core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 5b272bfd261d..2a00239661b3 100644
--- a/drivers/pinctrl/core.c
+++ b/drivers/pinctrl/core.c
@@ -1193,6 +1193,7 @@ void pinctrl_unregister_map(struct pinctrl_map const *map)
1193 list_for_each_entry(maps_node, &pinctrl_maps, node) { 1193 list_for_each_entry(maps_node, &pinctrl_maps, node) {
1194 if (maps_node->maps == map) { 1194 if (maps_node->maps == map) {
1195 list_del(&maps_node->node); 1195 list_del(&maps_node->node);
1196 kfree(maps_node);
1196 mutex_unlock(&pinctrl_maps_mutex); 1197 mutex_unlock(&pinctrl_maps_mutex);
1197 return; 1198 return;
1198 } 1199 }