Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+1
+1
drivers/pinctrl/core.c
··· 1193 list_for_each_entry(maps_node, &pinctrl_maps, node) { 1194 if (maps_node->maps == map) { 1195 list_del(&maps_node->node); 1196 mutex_unlock(&pinctrl_maps_mutex); 1197 return; 1198 }
··· 1193 list_for_each_entry(maps_node, &pinctrl_maps, node) { 1194 if (maps_node->maps == map) { 1195 list_del(&maps_node->node); 1196 + kfree(maps_node); 1197 mutex_unlock(&pinctrl_maps_mutex); 1198 return; 1199 }