Skip to content

Commit

Permalink
Fix leak in protocolServer().
Browse files Browse the repository at this point in the history
  • Loading branch information
dwsteele committed Jan 12, 2023
1 parent 9d42435 commit 6ec2241
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/protocol/helper.c
Expand Up @@ -442,8 +442,9 @@ protocolServer(IoServer *const tlsServer, IoSession *const socketSession)
// Ack the config command
protocolServerDataEndPut(result);

ioSessionMove(tlsSession, memContextPrior());
// Move result to prior context and move session into result so there is only one return value
protocolServerMove(result, memContextPrior());
ioSessionMove(tlsSession, objMemContext(result));
}
// Else the client can only detect that the server is alive
else
Expand Down

0 comments on commit 6ec2241

Please sign in to comment.