ref: b76a79c7264966eccd3bb37d41c3e229eb47ad49
parent: 025500d5aa59de75ff7ed5be94a4c635aa0cd1a5
author: sijchen <sijchen@cisco.com>
date: Tue Feb 9 12:10:48 EST 2016
move the rc free to the correct condition to avoid access to invalid memory
--- a/codec/encoder/core/src/encoder_ext.cpp
+++ b/codec/encoder/core/src/encoder_ext.cpp
@@ -2256,9 +2256,9 @@
pCtx->pVaa = NULL;
}
- WelsRcFreeMemory (pCtx);
// rate control module memory free
if (NULL != pCtx->pWelsSvcRc) {
+ WelsRcFreeMemory (pCtx);
pMa->WelsFree (pCtx->pWelsSvcRc, "pWelsSvcRc");
pCtx->pWelsSvcRc = NULL;
}