From db6c2c69c27f2c4fd1e2a1c6b0b1119b1e885f8a Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Tue, 23 Jul 2013 01:43:20 +0200 Subject: [PATCH] pinctrl: fix a memleak when freeing maps We forgot to free the node itself when free:ing a map. Reported-by: xulinuxkernel Reviewed-by: Stephen Warren Signed-off-by: Linus Walleij --- drivers/pinctrl/core.c | 1 + 1 file changed, 1 insertion(+) 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) 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; } -- 2.34.1