From a08ac7546fb3ff97e7cb7a8d5212eba159c112ec Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 9 Apr 2009 12:26:56 +0200 Subject: bugfix: potential memory leak in msg.c This one did not surface yet and the issue was actually found due to a problem in v4 - but better fix it here, too. --- msg.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'msg.c') diff --git a/msg.c b/msg.c index 3473495c..9ac45c57 100644 --- a/msg.c +++ b/msg.c @@ -1116,6 +1116,8 @@ void MsgAssignHOSTNAME(msg_t *pMsg, char *pBuf) { assert(pMsg != NULL); assert(pBuf != NULL); + if(pMsg->pszHOSTNAME != NULL) + free(pMsg->pszHOSTNAME); pMsg->iLenHOSTNAME = strlen(pBuf); pMsg->pszHOSTNAME = (uchar*) pBuf; } -- cgit v1.2.3