< Previous by Date Date Index Next by Date >
  Thread Index Next in Thread >

[reSIProcate] Memory Usage


Hello Resiprocate team,

In the TransactionState::processServerStale(...) method there may be a
leak created when TU re-transmissions are processed. 

When I made the changes below the memory usage decreased.

void
TransactionState::processServerStale(  Message* msg )
{
        .....
   if (isTimer(msg))
   {
      if (timer->getType() == Timer::TimerStaleServer)
      {
         // switch order of delete
        delete msg;
         delete this;
      }
        ......
   else if (isResponse(msg) && isFromTU(msg))
   {
      sendToWire(msg); 
           delete msg; // this reduces memory usage
   }

....
}

Is this correct ?

Brian.