1
0
Fork 0

greybus: camera: fix memory leak in configure-streams error path

Fix memory leak in configure-streams error path by making sure to
release the operation buffers before returning.

Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
hifive-unleashed-5.1
Johan Hovold 2015-12-30 11:08:00 +01:00 committed by Greg Kroah-Hartman
parent d39bf704ac
commit 12c8b0dcc8
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ static int gb_camera_configure_streams(struct gb_camera *gcam,
GB_CAMERA_TYPE_CONFIGURE_STREAMS,
req, req_size, resp, resp_size);
if (ret < 0)
return ret;
goto done;
if (le16_to_cpu(resp->num_streams) > nstreams) {
gcam_dbg(gcam, "got #streams %u > request %u\n",