gpu: host1x-fence: Fix fence leak in fence_extract

The fence_extract IOCTL handler was only putting the fence object
on the error path. Add a put to the success path as well.

Bug 4799184

Change-Id: Ib9fa3280320f16e1cf5588bd7b58900644601649
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261313
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Santosh BS <santoshb@nvidia.com>
This commit is contained in:
Mikko Perttunen
2024-12-04 02:45:32 +00:00
committed by mobile promotions
parent 57dc20f5a8
commit 03dd3ecc10

View File

@@ -172,6 +172,8 @@ static int dev_file_ioctl_fence_extract(struct host1x *host1x, void __user *data
goto put_fence; goto put_fence;
} }
dma_fence_put(fence);
return 0; return 0;
put_fence: put_fence: