fixed svace isues
[platform/adaptation/ap_samsung/libomxil-e3250-v4l2.git] / openmax / component / video / enc / mpeg4 / Exynos_OMX_Mpeg4enc.c
index 1ecfe21..a94fea4 100755 (executable)
@@ -1214,6 +1214,16 @@ EXIT:
     FunctionOut();
 
     return ret;
+
+ALLOC_FAILED:
+    for (i = 0; i < MFC_OUTPUT_BUFFER_NUM_MAX; i++) {
+        if (pVideoEnc->pMFCEncOutputBuffer[i])
+            Exynos_OSAL_Free(pVideoEnc->pMFCEncOutputBuffer[i]);
+    }
+    Exynos_OSAL_Log(EXYNOS_LOG_ERROR, "Failed to allocate buffers");
+
+    FunctionOut();
+    return ret;
 }
 
 OMX_ERRORTYPE Exynos_Mpeg4Enc_GetParameter(