diff options
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/msg.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/runtime/msg.c b/runtime/msg.c index b995ac53..2b58eb88 100644 --- a/runtime/msg.c +++ b/runtime/msg.c @@ -1489,6 +1489,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; } |