diff options
author | Basavapatna Dattaguru <dattaguru@google.com> | 2011-02-17 10:02:27 -0800 |
---|---|---|
committer | Basavapatna Dattaguru <dattaguru@google.com> | 2011-02-17 11:06:50 -0800 |
commit | b6c571382ade0561e95e63fef484f53971dc8c60 (patch) | |
tree | 404744343bd6c49bd0dae11ca1a73651cab53b75 /libvideoeditor/vss/mcs | |
parent | 8b95de2c4d57a0a07d7f4c59f2ddd52a140a361e (diff) | |
download | frameworks_av-b6c571382ade0561e95e63fef484f53971dc8c60.zip frameworks_av-b6c571382ade0561e95e63fef484f53971dc8c60.tar.gz frameworks_av-b6c571382ade0561e95e63fef484f53971dc8c60.tar.bz2 |
VideoEditor: Issue ID:3431967 : MemLeak with Invalid input
Modified the fix after review
Change-Id: Ic4dd92d76870256453a93b3a7d80e0d147884425
Diffstat (limited to 'libvideoeditor/vss/mcs')
-rwxr-xr-x | libvideoeditor/vss/mcs/src/M4MCS_API.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libvideoeditor/vss/mcs/src/M4MCS_API.c b/libvideoeditor/vss/mcs/src/M4MCS_API.c index aaaed14..a327426 100755 --- a/libvideoeditor/vss/mcs/src/M4MCS_API.c +++ b/libvideoeditor/vss/mcs/src/M4MCS_API.c @@ -3237,12 +3237,6 @@ M4OSA_ERR M4MCS_close( M4MCS_Context pContext ) M4OSA_free((M4OSA_MemAddr32)pC->H264MCSTempBuffer); } - if( M4OSA_NULL != pC->m_pInstance ) - { - err = H264MCS_Freeinstance(pC->m_pInstance); - pC->m_pInstance = M4OSA_NULL; - } - M4OSA_TRACE3_0("M4MCS_close(): returning M4NO_ERROR"); return err; } @@ -3307,6 +3301,12 @@ M4OSA_ERR M4MCS_cleanUp( M4MCS_Context pContext ) return M4ERR_STATE; } + if( M4OSA_NULL != pC->m_pInstance ) + { + err = H264MCS_Freeinstance(pC->m_pInstance); + pC->m_pInstance = M4OSA_NULL; + } + /* ----- Free video encoder stuff, if needed ----- */ if( ( M4OSA_NULL != pC->pViEncCtxt) |