Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1dae8c2a authored by Linus Walleij's avatar Linus Walleij Committed by Gerrit - the friendly Code Review server
Browse files

pinctrl: fix a memleak when freeing maps



We forgot to free the node itself when free:ing a map.

Reported-by: default avatarxulinuxkernel <xulinuxkernel@gmail.com>
Reviewed-by: default avatarStephen Warren <swarren@nvidia.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
Git-commit: db6c2c69c27f2c4fd1e2a1c6b0b1119b1e885f8a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


Change-Id: Icb8d5a33e7e869b2299b06d77e91469df5947b06
Signed-off-by: default avatarHanumant Singh <hanumant@codeaurora.org>
parent 93974768
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -1173,6 +1173,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;
		}