Free whole QMF domain in case of an error in FDK_QmfDomain_Configure()

Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc

Change-Id: I974006c1815d68baae042ad71625ffe4c7bb39ff
This commit is contained in:
Fraunhofer IIS FDK 2018-12-20 15:52:46 +01:00 committed by Jean-Michel Trivi
parent c371e86ef4
commit b9f1b6dec0
1 changed files with 2 additions and 3 deletions

View File

@ -983,9 +983,8 @@ QMF_DOMAIN_ERROR FDK_QmfDomain_Configure(HANDLE_FDK_QMF_DOMAIN hqd) {
}
bail:
if (err == QMF_DOMAIN_OUT_OF_MEMORY) {
FDK_QmfDomain_FreePersistentMemory(hqd);
FDK_QmfDomain_ClearConfigured(&hqd->globalConf);
if (err) {
FDK_QmfDomain_FreeMem(hqd);
}
return err;
}