[reSIProcate] Memory leak in reTurn
Diego Carvalho Domingos
ddomingos at daitan.com
Wed Apr 24 05:33:09 CDT 2019
I saw your commit. Thanks for your quick response and fix. Regards,
Diego
From: Scott Godin <sgodin at sipspectrum.com>
Sent: Tuesday, April 23, 2019 7:04 PM
To: Diego Carvalho Domingos <ddomingos at daitan.com>
Cc: resiprocate-devel at resiprocate.org
Subject: Re: [reSIProcate] Memory leak in reTurn
Hi Diego,
Nice find. That looks correct to me. I will commit a fix to GIT, thanks!
Scott
On Wed, Apr 17, 2019 at 1:04 PM Diego Carvalho Domingos <ddomingos at daitan.com<mailto:ddomingos at daitan.com>> wrote:
Hi all,
It seems there is a memory leak in TurnSocket.cxx, in this section:
// Stun Message has first two bits as 00
if((mReadBuffer[0] & 0xC0) == 0)
{
// StunMessage
StunMessage* stunMsg = new StunMessage(mLocalBinding, mConnectedTuple, &mReadBuffer[0], readSize);
unsigned int tempsize = size;
errorCode = handleStunMessage(*stunMsg, buffer, tempsize, sourceAddress, sourcePort);
if(!errorCode && tempsize == 0) // Signifies that a Stun/Turn request was received and there is nothing to return to receive caller
{
done = false;
}
else
{
size = tempsize;
}
}
I don’t see where stunMsg is deleted. I think it can be safely deleted before leaving the if block because it will be processed in handleStunMessage. Is this correct?
Best regards,
Diego
_______________________________________________
resiprocate-devel mailing list
resiprocate-devel at resiprocate.org<mailto:resiprocate-devel at resiprocate.org>
https://list.resiprocate.org/mailman/listinfo/resiprocate-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.resiprocate.org/pipermail/resiprocate-devel/attachments/20190424/8b586c4e/attachment.htm>
More information about the resiprocate-devel
mailing list