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; }