From b9f1b6dec01dab90aed33974603f188c7f6b1b5d Mon Sep 17 00:00:00 2001 From: Fraunhofer IIS FDK Date: Thu, 20 Dec 2018 15:52:46 +0100 Subject: [PATCH] Free whole QMF domain in case of an error in FDK_QmfDomain_Configure() Test: atest DecoderTestXheAac ; atest DecoderTestAacDrc Change-Id: I974006c1815d68baae042ad71625ffe4c7bb39ff --- libFDK/src/FDK_qmf_domain.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/libFDK/src/FDK_qmf_domain.cpp b/libFDK/src/FDK_qmf_domain.cpp index dd63dab..3245deb 100644 --- a/libFDK/src/FDK_qmf_domain.cpp +++ b/libFDK/src/FDK_qmf_domain.cpp @@ -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; }