From b87856d25d1be1953dea30814994fc40cac5e573 Mon Sep 17 00:00:00 2001 From: Robert Foss Date: Thu, 21 Apr 2016 17:49:20 -0400 Subject: 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 Reviewed-by: Emil Velikov --- src/gallium/state_trackers/omx/vid_enc.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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; } -- cgit v1.2.3