Re: [PATCH] regulator: cros-ec-regulator: Fix double free of desc->name.

2020-07-28 Thread Mark Brown
On Tue, 28 Jul 2020 17:19:09 +0800, Pi-Hsun Shih wrote: > The desc->name field is allocated with devm_kstrdup, but is also kfreed > on the error path, causing it to be double freed. Remove the kfree on > the error path. Applied to

Re: [PATCH] regulator: cros-ec-regulator: Fix double free of desc->name.

2020-07-28 Thread Enric Balletbo i Serra
Hi Pi-Hsun, Thank you for your patch and to send upstream. On 28/7/20 11:19, Pi-Hsun Shih wrote: > The desc->name field is allocated with devm_kstrdup, but is also kfreed > on the error path, causing it to be double freed. Remove the kfree on > the error path. > > Fixes: 8d9f8d57e023

[PATCH] regulator: cros-ec-regulator: Fix double free of desc->name.

2020-07-28 Thread Pi-Hsun Shih
The desc->name field is allocated with devm_kstrdup, but is also kfreed on the error path, causing it to be double freed. Remove the kfree on the error path. Fixes: 8d9f8d57e023 ("regulator: Add driver for cros-ec-regulator") Signed-off-by: Pi-Hsun Shih --- drivers/regulator/cros-ec-regulator.c