Skip to content

Commit

Permalink
[media] s5p-fimc: Fix possible memory leak during capture devnode reg…
Browse files Browse the repository at this point in the history
…istration

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>
  • Loading branch information
Sylwester Nawrocki authored and Mauro Carvalho Chehab committed Jun 11, 2011
1 parent 94215cc commit cfd7731
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/video/s5p-fimc/fimc-capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit cfd7731

Please sign in to comment.