Commit 12c8b0dc authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

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: default avatarJohan Hovold <johan@hovoldconsulting.com>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent d39bf704
......@@ -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",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment