soc: qcom: msm_perf: free allocated memory if error happens
If any error happens during allocating memory or initializing cluster
structure then it returns error but it does not free already
allocated memory. This may cause memory leak in certain scenerios.
This change prevents memory leak by freeing memory when error
happens during initialization.
Change-Id: I820acd676dc5baff270c2093ca24a1014c25dabb
Signed-off-by:
Tapas Kumar Kundu <tkundu@codeaurora.org>
Loading
Please register or sign in to comment