mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
gpu: nvgpu: fix resource leak in nvgpu_prof_ioctl_vab_flush
Allocated user_data is not freed on error from gk20a_busy. Free it. CID 10129907 Bug 3460991 Change-Id: Ic30b3cee1028a4829360fb591b90f29f74e6bdce Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2693941 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
0725a98ea9
commit
b58363d36f
@@ -836,6 +836,7 @@ static int nvgpu_prof_ioctl_vab_flush(struct nvgpu_profiler_object *prof,
|
||||
|
||||
err = gk20a_busy(g);
|
||||
if (err != 0) {
|
||||
nvgpu_kfree(g, user_data);
|
||||
nvgpu_err(g, "failed to poweron");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user