mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-19 06:28:19 +00:00
Merge pull request #7482 from Robyt3/Client-Serverbrowser-CommunityIcon-Leak
Fix leak of community icons when jobs not finished
This commit is contained in:
commit
4116d78c6f
|
@ -520,6 +520,7 @@ protected:
|
|||
SHA256_DIGEST m_Sha256;
|
||||
|
||||
CAbstractCommunityIconJob(CMenus *pMenus, const char *pCommunityId, int StorageType);
|
||||
virtual ~CAbstractCommunityIconJob();
|
||||
|
||||
public:
|
||||
const char *CommunityId() const { return m_aCommunityId; }
|
||||
|
|
|
@ -1799,6 +1799,12 @@ CMenus::CAbstractCommunityIconJob::CAbstractCommunityIconJob(CMenus *pMenus, con
|
|||
str_format(m_aPath, sizeof(m_aPath), "communityicons/%s.png", pCommunityId);
|
||||
}
|
||||
|
||||
CMenus::CAbstractCommunityIconJob::~CAbstractCommunityIconJob()
|
||||
{
|
||||
free(m_ImageInfo.m_pData);
|
||||
m_ImageInfo.m_pData = nullptr;
|
||||
}
|
||||
|
||||
int CMenus::CCommunityIconDownloadJob::OnCompletion(int State)
|
||||
{
|
||||
State = CHttpRequest::OnCompletion(State);
|
||||
|
|
Loading…
Reference in a new issue