fixed svace isues 11/173511/1 accepted/tizen/unified/20180322.145105 submit/tizen/20180322.052910
authorSejun Park <sejun79.park@samsung.com>
Thu, 22 Mar 2018 06:05:01 +0000 (15:05 +0900)
committerSejun Park <sejun79.park@samsung.com>
Thu, 22 Mar 2018 06:05:26 +0000 (15:05 +0900)
Change-Id: I7447a7f34e131a9179e3dc6b329b5f1a1443047a

openmax/component/video/enc/h264/Exynos_OMX_H264enc.c
openmax/component/video/enc/mpeg4/Exynos_OMX_Mpeg4enc.c

index 41cd3f2..f4f7808 100755 (executable)
@@ -1080,6 +1080,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_H264Enc_GetParameter(
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(