pinctrl: fix a memleak when freeing maps
authorLinus Walleij <linus.walleij@linaro.org>
Mon, 22 Jul 2013 23:43:20 +0000 (01:43 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 25 Jul 2013 15:18:36 +0000 (17:18 +0200)
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>
drivers/pinctrl/core.c

index 5b272bfd261d6803fad6eaac61a3fa28dab4e767..2a00239661b3c27ec979802a3f040f92f2276060 100644 (file)
@@ -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;
                }