]> git.baikalelectronics.ru Git - kernel.git/commit
media: staging: davinci: fix memory leaks and check for allocation failure
authorColin Ian King <colin.king@canonical.com>
Sat, 8 Jun 2019 11:27:25 +0000 (07:27 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Fri, 21 Jun 2019 20:19:54 +0000 (16:19 -0400)
commitefea69bd25611171da8d76ebf9afe4e33b97f772
tree6d7203447703da5dd208d3a34864775b7fe0c077
parent9295b82acff2bbb531d7e7b430807c8c7e757902
media: staging: davinci: fix memory leaks and check for allocation failure

There are three error return paths that don't kfree params causing a
memory leak.  Fix this by adding an error return path that kfree's
params before returning.  Also add a check to see params failed to
be allocated.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/davinci_vpfe/dm365_ipipe.c