提交 cfd77310 编写于 作者: S Sylwester Nawrocki 提交者: Mauro Carvalho Chehab

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

Add missing kfree on the error path.
Reported-by: NTomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: NSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: NKyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册