Skip to content

Commit

Permalink
free pPool->considered
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverkurth committed May 2, 2022
1 parent b4b6be4 commit fc25f2a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
6 changes: 5 additions & 1 deletion client/goal.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
6 changes: 6 additions & 0 deletions solv/tdnfpool.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fc25f2a

Please sign in to comment.