From 1b1fb636f72f6fa6ee3dcd4eefc4203eb0a3e483 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 14 Dec 2012 12:44:49 +0100 Subject: bugfix: small, mostly static memory leak in imtcp This had no practical effect, a handful of bytes was lost at most, no matter how many messages were processed (leak in config processor). --- plugins/imtcp/imtcp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'plugins/imtcp/imtcp.c') diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c index 8750eb59..fc22d452 100644 --- a/plugins/imtcp/imtcp.c +++ b/plugins/imtcp/imtcp.c @@ -498,10 +498,10 @@ CODESTARTendCnfLoad loadModConf->pszStrmDrvrAuthMode = NULL; } else { loadModConf->pszStrmDrvrAuthMode = cs.pszStrmDrvrAuthMode; + cs.pszStrmDrvrAuthMode = NULL; } } - if((cs.pszStrmDrvrAuthMode == NULL) || (cs.pszStrmDrvrAuthMode[0] == '\0')) - free(cs.pszStrmDrvrAuthMode); + free(cs.pszStrmDrvrAuthMode); cs.pszStrmDrvrAuthMode = NULL; loadModConf = NULL; /* done loading */ @@ -561,6 +561,7 @@ ENDactivateCnf BEGINfreeCnf instanceConf_t *inst, *del; CODESTARTfreeCnf + free(pModConf->pszStrmDrvrAuthMode); if(pModConf->permittedPeers != NULL) { cnfarrayContentDestruct(pModConf->permittedPeers); free(pModConf->permittedPeers); -- cgit v1.2.3