> I'm developing a RTSP client application. While testing I've found a possible 
> memory leak in RTSPClient::handleRequestError(). While calling the handler 
> there is a string duplication of the error string.

No, there's no memory leak here.  In *all* calls to a RTSP "responseHandler" 
(including the one called to implement "handleRequestError()"), the 
"resultString" parameter is assumed to have been dynamically allocated, and 
must be delete[]d after the handler function has been called.  (See the comment 
in "liveMedia/include/RTSPClient.hh", lines 59-60.)

However, your question did turn out to be useful, because after I read it, I 
went through the code, looking for places where we might not be delete[]ing the 
"resultString" afterwards.  I did find a handful of places - in the 
"testRTSPClient" and "openRTSP" applications - where the "resultString" was not 
being delete[]d; thus, there was a minor memory leak in those places (although 
only in situations where a RTSP request failed).  These will be fixed in the 
next release of the software.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

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

Reply via email to