diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2019-02-17 09:38:19 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-02-18 12:32:21 -0500 |
commit | cdabfa84025946b0eae4fefb5f6af3f9e99ce88b (patch) | |
tree | 00806b0ea12bd02911f4afa0ad9c5147d16d595c /drivers/media | |
parent | 959bba134238452b0a2f5c7d107d7d05b358b41f (diff) | |
download | linux-stable-cdabfa84025946b0eae4fefb5f6af3f9e99ce88b.tar.gz linux-stable-cdabfa84025946b0eae4fefb5f6af3f9e99ce88b.tar.bz2 linux-stable-cdabfa84025946b0eae4fefb5f6af3f9e99ce88b.zip |
media: vimc: fix memory leak
media_device_cleanup() wasn't called, which caused a small
memory leak.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/vimc/vimc-core.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/platform/vimc/vimc-core.c b/drivers/media/platform/vimc/vimc-core.c index c2fdf3ea67ed..0fbb7914098f 100644 --- a/drivers/media/platform/vimc/vimc-core.c +++ b/drivers/media/platform/vimc/vimc-core.c @@ -220,6 +220,7 @@ static int vimc_comp_bind(struct device *master) err_mdev_unregister: media_device_unregister(&vimc->mdev); + media_device_cleanup(&vimc->mdev); err_comp_unbind_all: component_unbind_all(master, NULL); err_v4l2_unregister: @@ -236,6 +237,7 @@ static void vimc_comp_unbind(struct device *master) dev_dbg(master, "unbind"); media_device_unregister(&vimc->mdev); + media_device_cleanup(&vimc->mdev); component_unbind_all(master, NULL); v4l2_device_unregister(&vimc->v4l2_dev); } |