From fc25f2a6cf1121049b6bb3daf0edcdd69c9d2a02 Mon Sep 17 00:00:00 2001 From: Oliver Kurth Date: Mon, 2 May 2022 23:20:06 +0000 Subject: [PATCH] free pPool->considered --- client/goal.c | 6 +++++- solv/tdnfpool.c | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/client/goal.c b/client/goal.c index 30872580..62b79f9e 100644 --- a/client/goal.c +++ b/client/goal.c @@ -959,7 +959,11 @@ TDNFSolvAddMinVersions( map_setall(pPool->considered); map_subtract(pPool->considered, pMapMinVersions); cleanup: - TDNFFreeMemory(pMapMinVersions); + if(pMapMinVersions) + { + map_free(pMapMinVersions); + TDNFFreeMemory(pMapMinVersions); + } TDNF_SAFE_FREE_MEMORY(pszTmp); TDNF_SAFE_FREE_STRINGARRAY(ppszTokens); return dwError; diff --git a/solv/tdnfpool.c b/solv/tdnfpool.c index b9f90374..ec87897e 100644 --- a/solv/tdnfpool.c +++ b/solv/tdnfpool.c @@ -48,6 +48,12 @@ SolvFreeSack( Pool* pPool = pSack->pPool; if(pPool) { + if (pPool->considered) + { + /* shouldn't this be owned by pPool? */ + map_free(pPool->considered); + TDNF_SAFE_FREE_MEMORY(pPool->considered); + } pool_free(pPool); } TDNF_SAFE_FREE_MEMORY(pSack->pszCacheDir);