summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/bpf/prog_tests/prog_array_init.c
diff options
context:
space:
mode:
authorLizhi Hou <lizhi.hou@amd.com>2025-08-18 18:22:21 +0300
committerRob Herring (Arm) <robh@kernel.org>2025-08-21 02:37:51 +0300
commitc81f6ce16785cc07ae81f53deb07b662ed0bb3a5 (patch)
tree5ea55610025a7f903994c819e0ca753118d7cddd /tools/testing/selftests/bpf/prog_tests/prog_array_init.c
parent79aef1a3705bbc95b36dad892af1f313490bd65c (diff)
downloadlinux-c81f6ce16785cc07ae81f53deb07b662ed0bb3a5.tar.xz
of: dynamic: Fix memleak when of_pci_add_properties() failed
When of_pci_add_properties() failed, of_changeset_destroy() is called to free the changeset. And of_changeset_destroy() puts device tree node in each entry but does not free property in the entry. This leads to memory leak in the failure case. In of_changeset_add_prop_helper(), add the property to the device tree node deadprops list. Thus, the property will also be freed along with device tree node. Fixes: b544fc2b8606 ("of: dynamic: Add interfaces for creating device node dynamically") Reported-by: Lorenzo Pieralisi <lpieralisi@kernel.org> Closes: https://lore.kernel.org/all/aJms+YT8TnpzpCY8@lpieralisi/ Tested-by: Lorenzo Pieralisi <lpieralisi@kernel.org> Signed-off-by: Lizhi Hou <lizhi.hou@amd.com> Link: https://lore.kernel.org/r/20250818152221.3685724-1-lizhi.hou@amd.com Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/prog_array_init.c')
0 files changed, 0 insertions, 0 deletions