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)
commita84e355ecd3ed9759d7aaa40170aab78e2a68a06
tree6d7203447703da5dd208d3a34864775b7fe0c077
parent94b5bf3ac9c4b34a2b1516772c63fb94da6ad5d3
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