Fix memory leaks found by Quint (#2248)

This commit is contained in:
Michael Cook (mackal) 2022-06-07 23:41:13 -04:00 committed by GitHub
parent fcc7725ca3
commit 63ba5dc3ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -1504,6 +1504,7 @@ void Client::SendGuildList() {
//ask the guild manager to build us a nice guild list packet
outapp->pBuffer = guild_mgr.MakeGuildList("", outapp->size);
if(outapp->pBuffer == nullptr) {
safe_delete(outapp);
return;
}

View File

@ -175,6 +175,7 @@ void Client::SendGuildList() {
outapp->pBuffer = guild_mgr.MakeGuildList(/*GetName()*/"", outapp->size);
if(outapp->pBuffer == nullptr) {
LogGuilds("Unable to make guild list!");
safe_delete(outapp);
return;
}