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

Add missing kfree on the error path.

Reported-by: Tomasz Stanislawski <t.stanislaws@samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Sylwester Nawrocki 2011-06-02 06:18:34 -03:00 committed by Mauro Carvalho Chehab
parent 94215ccd99
commit cfd77310a9

View file

@ -903,6 +903,7 @@ int fimc_register_capture_device(struct fimc_dev *fimc)
err_v4l2_reg:
v4l2_device_unregister(v4l2_dev);
err_info:
kfree(ctx);
dev_err(&fimc->pdev->dev, "failed to install\n");
return ret;
}