Fix potential mem leak in remote function/event unserialization.

I say potential because a code path to get in the required state is
not obvious (if one even exists).
This commit is contained in:
Jon Siwek 2014-05-28 14:55:24 -05:00
parent ed7273ccf1
commit 8383828b02
3 changed files with 14 additions and 1 deletions

View file

@ -2833,6 +2833,7 @@ void RemoteSerializer::GotEvent(const char* name, double time,
if ( ! current_peer )
{
Error("unserialized event from unknown peer");
delete_vals(args);
return;
}
@ -2882,6 +2883,7 @@ void RemoteSerializer::GotFunctionCall(const char* name, double time,
if ( ! current_peer )
{
Error("unserialized function from unknown peer");
delete_vals(args);
return;
}