Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdd8d351 authored by Nicholas Troast's avatar Nicholas Troast
Browse files

power: pmic-voter: fix memory leak in create_votable



Memory is leaked when an ERR_PTR is returned after memory has been
allocated for the votable. Fix this by allocating memory after all
the parameters have been validated.

CRs-Fixed: 957574
Change-Id: I0a3ba9dcf3d6138694677874b9b19b6cdd434a07
Signed-off-by: default avatarNicholas Troast <ntroast@codeaurora.org>
parent 64182585
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