[Live-devel] Coverity detected a memory leak in RTSPClient::setupMediaSubsession

Ross Finlayson finlayson at live555.com
Wed May 2 22:04:59 PDT 2007


>"sessionStr", "setupStr", "authenticatorStr" are not deleted when 
>the function returns ar 1018 because of break at 902
>
>900 		if (rtpNumber == 0) {
>901 		  envir().setResultMsg("Client port number unknown\n");
>902 		  break;
>903 		}
>
>1017	  delete[] cmd;
>1018      return False;
>1019	} // End of Function

Those line numbers do not match the current version of the code. 
Please download and use the latest version of the code instead.


>While looking at the fix for this I thought it simpler to 
>functionally decompose the setup string creation, and go with the 
>old style single return point.

No, if you want to send a patch, then please send one that (i) uses 
the latest version of the code, and (ii) addresses the memory leak 
issue only.  Should I also decide to 'refactor' the setup string 
creation code, then I'll do that separately.

-- 

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


More information about the live-devel mailing list