From: Johan Hovold Date: Wed, 30 Dec 2015 10:08:00 +0000 (+0100) Subject: greybus: camera: fix memory leak in configure-streams error path X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=12c8b0dcc884cc7f1f925cd1ed08cf8cdc95e7ef;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Laurent Pinchart Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index c742fea29492..8b2eedd29cb3 100644 --- a/drivers/staging/greybus/camera.c +++ b/drivers/staging/greybus/camera.c @@ -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",