hi all,
    I found a memory leak in version 2023.0303.  The following is my patch, 
please take a look.


Best Regards,
Jie
----


diff --git a/liveMedia/RTSPServer.cpp b/liveMedia/RTSPServer.cpp
index d649779..1210702 100644
--- a/liveMedia/RTSPServer.cpp
+++ b/liveMedia/RTSPServer.cpp
@@ -493,6 +493,7 @@ void 
RTSPServer::RTSPClientConnection::handleCmd_notSupported() {
 }


 void RTSPServer::RTSPClientConnection::handleCmd_redirect(char const* 
urlSuffix) {
+  char *urlPrefix = fOurRTSPServer.rtspURLPrefix(fClientInputSocket);
   snprintf((char*)fResponseBuffer, sizeof fResponseBuffer,
           "RTSP/1.0 301 Moved Permanently\r\n"
           "CSeq: %s\r\n"
@@ -500,7 +501,8 @@ void 
RTSPServer::RTSPClientConnection::handleCmd_redirect(char const* urlSuffix)
           "Location: %s%s\r\n\r\n",
           fCurrentCSeq,
           dateHeader(),
-          fOurRTSPServer.rtspURLPrefix(fClientInputSocket), urlSuffix);
+          urlPrefix, urlSuffix);
+  delete[] urlPrefix;
 }
_______________________________________________
live-devel mailing list
live-devel@lists.live555.com
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to