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:
Nicholas Troast <ntroast@codeaurora.org>
Loading
Please register or sign in to comment