[Live-devel] memory leak in MultiFrameRTPSource

David BERTRAND bidibulle at operamail.com
Mon Aug 21 05:34:55 PDT 2006


Hi Ross,
It seems that liveMedia library (version "2006.06.27") has a memory leak in MultiFrameRTPSource class. In method "ReorderingPacketBuffer::storePacket" there is one case where function returns without adding the newly created packet in the queue and where the packet is not freed.
This happens if a sequence number has already been received (duplicated packet).

Here below the incriminated code :

  // Figure out where the new packet will be stored in the queue:
  BufferedPacket* beforePtr = NULL;
  BufferedPacket* afterPtr = fHeadPacket;
  while (afterPtr != NULL) {
    if (seqNumLT(rtpSeqNo, afterPtr->rtpSeqNo())) break; // it comes here
    if (rtpSeqNo == afterPtr->rtpSeqNo()) {
      // This is a duplicate packet - ignore it
      freePacket(bPacket); !!! fix for the memory leak
      return;
    }

David

-- 
_______________________________________________
Surf the Web in a faster, safer and easier way:
Download Opera 9 at http://www.opera.com

Powered by Outblaze



More information about the live-devel mailing list