[Live-devel] Memory leak

Rawling, Stuart SRawling at pelco.com
Sat Jul 25 10:25:19 PDT 2009


Hi Ross,

In teardownMediaSubsession in RTSPClient, the subsession¹s sessionId
variable is deleted and reset.  However *only if*  the teardown succeeds.
If the teardown fails and the MediaSubsession is subsequently closed using
the proper method, then the sessionId will not be freed.  I suggest also
delete the pointer in the destructor of MediaSubsession in case it has not
already being deleted.   I know that you are reworking RTSPClient, but I
still think this is worth handling in MediaSubsession as an edge case.

Regards,
Stuart


Patch:
--- MediaSession.cpp    2009-07-25 03:22:31.000000000 -0700
+++ MediaSession.cpp.new    2009-07-25 03:23:53.000000000 -0700
@@ -563,7 +563,8 @@
 
   delete[] fConnectionEndpointName; delete[] fSavedSDPLines;
   delete[] fMediumName; delete[] fCodecName; delete[] fProtocolName;
-  delete[] fControlPath; delete[] fConfig; delete[] fMode; delete[]
fSpropParameterSets;
+  delete[] fControlPath; delete[] fConfig; delete[] fMode; delete[]
fSpropParameterSets;
+  delete[] sessionId;
 
   delete fNext;
 #ifdef SUPPORT_REAL_RTSP


- ------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this transmission is legally privileged and confidential, intended only for the use of the individual(s) or entities named above. This email and any files transmitted with it are the property of Pelco. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, you are hereby notified that any review, disclosure, copying, distribution, retention, or any action taken or omitted to be taken in reliance on it is prohibited and may be unlawful. If you receive this communication in error, please notify us immediately by telephone call to +1-559-292-1981 or forward the e-mail to administrator at pelco.com and then permanently delete the e-mail and destroy all soft and hard copies of the message and any attachments. Thank you for your cooperation. 
- ------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20090725/7b6ed708/attachment-0001.html>


More information about the live-devel mailing list