diff options
author | Emil Velikov <[email protected]> | 2016-04-29 13:51:45 +0100 |
---|---|---|
committer | Emil Velikov <[email protected]> | 2016-04-29 15:36:18 +0100 |
commit | 4b1ea6910ee54afb30fd005eb1f8cf6f88338eda (patch) | |
tree | 15e51c860b82b39a361cefe9de7f09b633acdfe5 | |
parent | c750029b37c64521267910af0ec2c89c58c82987 (diff) |
st/omx: don't return early in vid_enc_EncodeFrame()
Earlier commit plugged a memory leak, although it missed a pair of
brackets. Thus we unconditionally returned even in the case of no error.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=95203
Fixes: b87856d25d1 ("st/omx: Fix resource leak on OMX_ErrorNone")
Tested-by: Andy Furniss <[email protected]>
Acked-by: Robert Foss <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>
---
What an embarassing bug - missing brackets. Andy can you confirm that it
resolves the issue ?
-rw-r--r-- | src/gallium/state_trackers/omx/vid_enc.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/omx/vid_enc.c b/src/gallium/state_trackers/omx/vid_enc.c index de621662f45..5565241a615 100644 --- a/src/gallium/state_trackers/omx/vid_enc.c +++ b/src/gallium/state_trackers/omx/vid_enc.c @@ -1151,9 +1151,10 @@ static OMX_ERRORTYPE vid_enc_EncodeFrame(omx_base_PortType *port, OMX_BUFFERHEAD } else { /* ------- load input image into video buffer ---- */ err = enc_LoadImage(port, buf, task->buf); - if (err != OMX_ErrorNone) + if (err != OMX_ErrorNone) { FREE(task); return err; + } } /* -------------- determine picture type --------- */ |