Fix memory leak in _client_loginreq2() when returning without calling packet_del_ref() on variable 'rpacket'

This commit is contained in:
RElesgoe 2016-08-23 20:38:03 -07:00
parent 6cbf39f611
commit 39ef8d5791

View file

@ -1668,6 +1668,8 @@ namespace pvpgn
else {
bn_int_set(&rpacket->u.server_loginreply2.message, SERVER_LOGINREPLY2_MESSAGE_BADPASS);
}
packet_del_ref(rpacket);
return -1;
}
}
@ -1766,6 +1768,7 @@ namespace pvpgn
{
// feature to break login from Lua
conn_set_state(c, conn_state_destroy);
packet_del_ref(rpacket);
return -1;
}
#endif