summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Foss <[email protected]>2016-04-21 17:49:20 -0400
committerEmil Velikov <[email protected]>2016-04-25 15:09:37 +0100
commitb87856d25d1be1953dea30814994fc40cac5e573 (patch)
tree5fa030e47cafe759870e0842efe7509a847f4a91
parent3c8f9ed9b7fd4462bae66685bf2389f4802dc84e (diff)
st/omx: Fix resource leak on OMX_ErrorNone
Avoid leaking buffer allocated for task if an error has occured. Coverity id: 1213929 Signed-off-by: Robert Foss <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
-rw-r--r--src/gallium/state_trackers/omx/vid_enc.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c
index 4505fe1a693..de621662f45 100644
--- a/src/gallium/state_trackers/omx/vid_enc.c
+++ b/src/gallium/state_trackers/omx/vid_enc.c
@@ -1152,6 +1152,7 @@ static OMX_ERRORTYPE vid_enc_EncodeFrame(omx_base_PortType *port, OMX_BUFFERHEAD
/* ------- load input image into video buffer ---- */
err = enc_LoadImage(port, buf, task->buf);
if (err != OMX_ErrorNone)
+ FREE(task);
return err;
}