diff options
| author | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2026-08-11 21:09:28 +0900 |
|---|---|---|
| committer | Takashi Sakamoto <o-takashi@sakamocchi.jp> | 2026-08-12 07:50:06 +0900 |
| commit | 05bfb1327dc5fb61528bab31cd8f0c1e4bddec23 (patch) | |
| tree | ad3d1fc8b6f6f7b3282b5edb277aab1e2e460abe /scripts/Makefile.thinlto | |
| parent | a563a7cb645a79a3a7e31bed8cbf95980ef5feb1 (diff) | |
| download | linux-stable-05bfb1327dc5fb61528bab31cd8f0c1e4bddec23.tar.gz linux-stable-05bfb1327dc5fb61528bab31cd8f0c1e4bddec23.zip | |
firewire: core: fix memory leak in error path of build_tree()
In the error path of build_tree(), node instances can remain in the local
linked list when the function returns.
Whenever an invalid value is detected in the self ID sequence, each
allocated node instance is either an entry in the linked list or an
entry in the ports array of its parent node. Therefore, the allocate
node instances can be safely released by traversing the linked list from
its head.
Release the remaining node instances with for_each_fw_node() before
returning to the caller.
Fixes: 3038e353cfaf ("firewire: Add core firewire stack.")
Reported-by: Abdun Nihaal <nihaal@cse.iitm.ac.in>
Link: https://lore.kernel.org/all/20260727095955.104972-1-nihaal@cse.iitm.ac.in/
Link: https://lore.kernel.org/r/20260811120928.700577-4-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
