Fix code analysis issues and a couple small memory leaks

This commit is contained in:
Cameron Gutman
2014-08-24 12:47:04 -07:00
parent 22f6027cfa
commit 51710ff18a
2 changed files with 11 additions and 6 deletions
+3 -3
View File
@@ -1,19 +1,20 @@
#include "Limelight-internal.h"
#include "Rtsp.h"
#define RTSP_MAX_RESP_SIZE 16384
static SOCKET sock = INVALID_SOCKET;
static IP_ADDRESS remoteAddr;
static int currentSeqNumber = 1;
static char rtspTargetUrl[256];
static char sessionIdString[16];
static int hasSessionId = 0;
static char responseBuffer[RTSP_MAX_RESP_SIZE];
/* GFE 2.1.1 */
#define RTSP_CLIENT_VERSION 10
#define RTSP_CLIENT_VERSION_S "10"
#define RTSP_MAX_RESP_SIZE 16384
/* Create RTSP Option */
static POPTION_ITEM createOptionItem(char* option, char* content)
{
@@ -81,7 +82,6 @@ static int initializeRtspRequest(PRTSP_MESSAGE msg, char* command, char* target)
/* Returns 1 on success, 0 otherwise */
static int transactRtspMessage(PRTSP_MESSAGE request, PRTSP_MESSAGE response) {
int err, ret = 0;
char responseBuffer[RTSP_MAX_RESP_SIZE];
int offset;
PRTSP_MESSAGE responseMsg = NULL;
char* serializedMessage = NULL;