mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 10:00:17 +00:00
media: st-delta: Fix reference count leak in delta_run_work
delta_run_work() calls delta_get_sync() that increments the reference counter. In case of failure, decrement the reference count by calling delta_put_autosuspend(). Signed-off-by: Aditya Pakki <pakki001@umn.edu> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
committed by
Mauro Carvalho Chehab
parent
6f4432bae9
commit
57cc666d36
@@ -954,8 +954,10 @@ static void delta_run_work(struct work_struct *work)
|
|||||||
/* enable the hardware */
|
/* enable the hardware */
|
||||||
if (!dec->pm) {
|
if (!dec->pm) {
|
||||||
ret = delta_get_sync(ctx);
|
ret = delta_get_sync(ctx);
|
||||||
if (ret)
|
if (ret) {
|
||||||
|
delta_put_autosuspend(ctx);
|
||||||
goto err;
|
goto err;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* decode this access unit */
|
/* decode this access unit */
|
||||||
|
|||||||
Reference in New Issue
Block a user