[media] s5p-fimc: Fix possible memory leak during capture devnode registration
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 2 Jun 2011 09:18:34 +0000 (06:18 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 11 Jun 2011 12:45:20 +0000 (09:45 -0300)
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>
drivers/media/video/s5p-fimc/fimc-capture.c

index d142b40ea64efd1135dbfc242b5fd7d4c7092697..7e66455be0da507d577399f3de95c4f8f740fe7a 100644 (file)
@@ -903,6 +903,7 @@ err_vd_reg:
 err_v4l2_reg:
        v4l2_device_unregister(v4l2_dev);
 err_info:
+       kfree(ctx);
        dev_err(&fimc->pdev->dev, "failed to install\n");
        return ret;
 }