diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-12-30 11:08:00 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-12-30 13:16:06 -0800 |
commit | 12c8b0dcc884cc7f1f925cd1ed08cf8cdc95e7ef (patch) | |
tree | 0c88a83ca114f490f4041969e83ae7bbc9867f4e /drivers/staging/greybus/camera.c | |
parent | d39bf704acbd254576e3fc880ec13e6cd09e88c7 (diff) | |
download | op-kernel-dev-12c8b0dcc884cc7f1f925cd1ed08cf8cdc95e7ef.zip op-kernel-dev-12c8b0dcc884cc7f1f925cd1ed08cf8cdc95e7ef.tar.gz |
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>
Diffstat (limited to 'drivers/staging/greybus/camera.c')
-rw-r--r-- | drivers/staging/greybus/camera.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/camera.c b/drivers/staging/greybus/camera.c index c742fea..8b2eedd 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", |