Commit cfd77310 authored by Sylwester Nawrocki's avatar Sylwester Nawrocki Committed by Mauro Carvalho Chehab

[media] s5p-fimc: Fix possible memory leak during capture devnode registration

Add missing kfree on the error path.
Reported-by: default avatarTomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 94215ccd
...@@ -903,6 +903,7 @@ int fimc_register_capture_device(struct fimc_dev *fimc) ...@@ -903,6 +903,7 @@ int fimc_register_capture_device(struct fimc_dev *fimc)
err_v4l2_reg: err_v4l2_reg:
v4l2_device_unregister(v4l2_dev); v4l2_device_unregister(v4l2_dev);
err_info: err_info:
kfree(ctx);
dev_err(&fimc->pdev->dev, "failed to install\n"); dev_err(&fimc->pdev->dev, "failed to install\n");
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment