[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1374536739-18966-1-git-send-email-linus.walleij@linaro.org>
Date: Tue, 23 Jul 2013 01:45:39 +0200
From: Linus Walleij <linus.walleij@...aro.org>
To: linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Cc: Stephen Warren <swarren@...dia.com>,
xulinuxkernel <xulinuxkernel@...il.com>,
Linus Walleij <linus.walleij@...aro.org>
Subject: [PATCH] pinctrl: fix a memleak when freeing maps
We forgot to free the node itself when free:ing a map.
Reported-by: xulinuxkernel <xulinuxkernel@...il.com>
Signed-off-by: Linus Walleij <linus.walleij@...aro.org>
---
drivers/pinctrl/core.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/pinctrl/core.c b/drivers/pinctrl/core.c
index 5b272bf..2a00239 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;
}
--
1.8.1.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists