diff options
author | Wenwen Wang <wenwen@cs.uga.edu> | 2019-08-17 02:27:46 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-10-05 12:27:48 +0200 |
commit | a9df2fd8e064ea6426297adf2ac78b5e4a6d2b4b (patch) | |
tree | 5c2f489f7f82aa6b4ab28c6b69e73dc516e9f565 /drivers/acpi/custom_method.c | |
parent | 70e2968f3bf2bce0abf2a2e9a9516652d035a376 (diff) |
media: cpia2_usb: fix memory leaks
[ Upstream commit 1c770f0f52dca1a2323c594f01f5ec6f1dddc97f ]
In submit_urbs(), 'cam->sbuf[i].data' is allocated through kmalloc_array().
However, it is not deallocated if the following allocation for urbs fails.
To fix this issue, free 'cam->sbuf[i].data' if usb_alloc_urb() fails.
Signed-off-by: Wenwen Wang <wenwen@cs.uga.edu>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/acpi/custom_method.c')
0 files changed, 0 insertions, 0 deletions