3086: Fix 2 leaks in CServerBrowser r=def- a=Learath2

The only leaks reported by ASan that are allocated by us. There is one other by SDL and one by X11.

Co-authored-by: Learath2 <learath2@gmail.com>
This commit is contained in:
bors[bot] 2020-10-13 16:33:39 +00:00 committed by GitHub
commit e11511fe8b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -70,6 +70,12 @@ CServerBrowser::CServerBrowser()
CServerBrowser::~CServerBrowser()
{
if(m_ppServerlist)
free(m_ppServerlist);
if(m_pSortedServerlist)
free(m_pSortedServerlist);
if(m_pDDNetInfo)
json_value_free(m_pDDNetInfo);
}