diff options
| author | Guangshuo Li <lgs201920130244@gmail.com> | 2026-03-21 15:42:40 +0800 |
|---|---|---|
| committer | Philipp Zabel <p.zabel@pengutronix.de> | 2026-03-23 12:18:41 +0100 |
| commit | fbffb8c7c7bb4d38e9f65e0bee446685011de5d8 (patch) | |
| tree | dba733ddf08acb2490fa86a8d00c4209b5d9cc2f /drivers/acpi/parser/git@git.tavy.me:linux.git | |
| parent | c961cc86af01246a7ce706bbc29072d314e00880 (diff) | |
reset: gpio: fix double free in reset_add_gpio_aux_device() error path
When __auxiliary_device_add() fails, reset_add_gpio_aux_device()
calls auxiliary_device_uninit(adev).
The device release callback reset_gpio_aux_device_release() frees
adev, but the current error path then calls kfree(adev) again,
causing a double free.
Keep kfree(adev) for the auxiliary_device_init() failure path, but
avoid freeing adev after auxiliary_device_uninit().
Fixes: 5fc4e4cf7a22 ("reset: gpio: use software nodes to setup the GPIO lookup")
Cc: stable@vger.kernel.org
Signed-off-by: Guangshuo Li <lgs201920130244@gmail.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Diffstat (limited to 'drivers/acpi/parser/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
