Free 'gameresult', 'gameresult->players', and 'gameresult->heroes' before returning NULL in anongame_gameresult_parse()
This commit is contained in:
parent
94aaa0c928
commit
0ef29ae7bf
1 changed files with 3 additions and 0 deletions
|
@ -113,6 +113,9 @@ namespace pvpgn
|
|||
if (packet_get_size(packet) < expectedsize + sizeof(t_client_w3route_gameresult_hero)*heroes_count)
|
||||
{
|
||||
eventlog(eventlog_level_error, __FUNCTION__, "gameresult packet is smaller than expected");
|
||||
xfree(gameresult->heroes);
|
||||
xfree(gameresult->players);
|
||||
xfree(gameresult);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue