Skip to content
Unverified Commit 176cf704 authored by Pi-Hsun Shih's avatar Pi-Hsun Shih Committed by Mark Brown
Browse files

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



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: 8d9f8d57 ("regulator: Add driver for cros-ec-regulator")
Signed-off-by: default avatarPi-Hsun Shih <pihsun@chromium.org>
Reviewed-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Link: https://lore.kernel.org/r/20200728091909.2009771-1-pihsun@chromium.org


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent a2335476
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment