Ross,
 
While reviewing the code of Class ReorderingPacketBuffer in file
MultiFramedRTPSource.cpp I think I might have found potential issues.
 
The first issue is related to :  delete fHeadPacket when reset() method of
ReorderingPacketBuffer is called. The fHeadPacket pointer can be NULL if it
is calling in the context of ~ReorderingPacketBuffer() when the medium
source is closed. I know it legal on C++ but it is confusing for someone
trying to understand the code. I have not thoroughly checked but I also
worry that in some cases when the medium is closed that fHeadPacket and
fSavedPacket are identical and non null causing a double delete.

The second issue is related to the allocation of BufferedPacket. If the
medium source is closed while many buffered packet are chained together
because of a reordering issue at this moment then I believe the
BufferedPacket allocated by the method getFreePacket won't be freed and will
cause memory leaks. If I am right then some mechanism should be provided to
walk the chained list and free all the allocated buffered packets.

Regards
Guy Bonneau


_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to