summaryrefslogtreecommitdiffstats
path: root/plugins/imtcp/imtcp.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-12-14 12:44:49 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2012-12-14 12:44:49 +0100
commit1b1fb636f72f6fa6ee3dcd4eefc4203eb0a3e483 (patch)
tree733335051f3c2e19f72ac62e45afb090ff9e847b /plugins/imtcp/imtcp.c
parent5f2dd7ba0d39132be3d63404ec078b5ee9d81ddc (diff)
downloadrsyslog-1b1fb636f72f6fa6ee3dcd4eefc4203eb0a3e483.tar.gz
rsyslog-1b1fb636f72f6fa6ee3dcd4eefc4203eb0a3e483.tar.bz2
rsyslog-1b1fb636f72f6fa6ee3dcd4eefc4203eb0a3e483.zip
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).
Diffstat (limited to 'plugins/imtcp/imtcp.c')
-rw-r--r--plugins/imtcp/imtcp.c5
1 files changed, 3 insertions, 2 deletions
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);