From 46287fa5e8f2e961e9f9cb48df08d171ea510ec8 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 14 Jun 2012 18:50:16 +0200 Subject: bugfix: small memory leak in imptcp (static after config read) --- plugins/imptcp/imptcp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/imptcp/imptcp.c b/plugins/imptcp/imptcp.c index 90216b5b..6961a696 100644 --- a/plugins/imptcp/imptcp.c +++ b/plugins/imptcp/imptcp.c @@ -262,6 +262,7 @@ destructSrv(ptcpsrv_t *pSrv) { prop.Destruct(&pSrv->pInputName); pthread_mutex_destroy(&pSrv->mutSessLst); + free(pSrv->pszInputName); free(pSrv->port); free(pSrv); } @@ -1071,7 +1072,7 @@ addListner(modConfData_t __attribute__((unused)) *modConf, instanceConf_t *inst) CHKmalloc(pSrv->lstnIP = ustrdup(inst->pszBindAddr)); } pSrv->pRuleset = inst->pBindRuleset; - pSrv->pszInputName = (inst->pszInputName == NULL) ? UCHAR_CONSTANT("imptcp") : ustrdup(inst->pszInputName); + pSrv->pszInputName = ustrdup((inst->pszInputName == NULL) ? UCHAR_CONSTANT("imptcp") : inst->pszInputName); CHKiRet(prop.Construct(&pSrv->pInputName)); CHKiRet(prop.SetString(pSrv->pInputName, pSrv->pszInputName, ustrlen(pSrv->pszInputName))); CHKiRet(prop.ConstructFinalize(pSrv->pInputName)); -- cgit v1.2.3