diff options
| author | Peng Fan <[email protected]> | 2026-07-03 17:11:27 +0800 |
|---|---|---|
| committer | Tom Rini <[email protected]> | 2026-07-16 12:03:05 -0600 |
| commit | e1f345abf4c0df94ef6c5eca400a440c16b47d81 (patch) | |
| tree | ac61a6905fcf985e3da914531cb1385c2183c615 /lib/crypto/mscode_parser.c | |
| parent | 0af2ed57a3e9c34775602ea70d5c9829c4e830c6 (diff) | |
dm: core: free old name in device_set_name to prevent leak
If device_set_name is called on a device that already has
DM_FLAG_NAME_ALLOCED set, the old dynamically-allocated name is leaked.
Free it before assigning the new name.
See: drivers/net/mdio_gpio.c:mdio_gpio_bind(). There is
device_set_name() here, however dm_mdio_post_bind() will also call
device_set_name() if "device-name" exists.
Signed-off-by: Peng Fan <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
Diffstat (limited to 'lib/crypto/mscode_parser.c')
0 files changed, 0 insertions, 0 deletions
