diff options
| author | David Yang <mmyangfl@gmail.com> | 2026-06-18 22:01:55 +0800 |
|---|---|---|
| committer | Jakub Kicinski <kuba@kernel.org> | 2026-06-24 17:46:18 -0700 |
| commit | 056a5087d87ead77dedbe9cf5bde53b7cd4b4651 (patch) | |
| tree | 2fe47a57457d5389a5abed590d3cccbfae8a62ff /scripts/Makefile.thinlto | |
| parent | db818b0e8af7bac16860116a19c341a63d6677b4 (diff) | |
net: dsa: realtek: fix memory leak in rtl8366rb_setup_led()
led_classdev_register_ext() only reads init_data.devicename - it never
stores the pointer. However, the caller allocated devicename with
kasprintf() but never freed it, leaking the string memory.
Fix it with a stack buffer to avoid dynamic buffers completely.
Fixes: 32d617005475 ("net: dsa: realtek: add LED drivers for rtl8366rb")
Signed-off-by: David Yang <mmyangfl@gmail.com>
Reviewed-by: Linus Walleij <linusw@kernel.org>
Link: https://patch.msgid.link/20260618140200.1888707-1-mmyangfl@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
