diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-23 14:29:41 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-23 14:29:41 +0200 |
commit | 6c5264159c099ddc4d06590508980ee53a83b67b (patch) | |
tree | ec209c9bdd5d735bc36d504a8c5025d00e1b2b46 /plugins | |
parent | 31ba42de664341c0c25236c619c7e1eb81f71d1d (diff) | |
download | rsyslog-6c5264159c099ddc4d06590508980ee53a83b67b.tar.gz rsyslog-6c5264159c099ddc4d06590508980ee53a83b67b.tar.xz rsyslog-6c5264159c099ddc4d06590508980ee53a83b67b.zip |
fixing a small (newly-introduced) memory leak
... plus simplifying free() calls after agreement on mailing list
that we no longer need to check if the pointer is non-NULL
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/imtcp/imtcp.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/plugins/imtcp/imtcp.c b/plugins/imtcp/imtcp.c index 5a8a62f6..9883fa89 100644 --- a/plugins/imtcp/imtcp.c +++ b/plugins/imtcp/imtcp.c @@ -245,14 +245,10 @@ resetConfigVariables(uchar __attribute__((unused)) *pp, void __attribute__((unus iTCPSessMax = 200; iStrmDrvrMode = 0; iAddtlFrameDelim = TCPSRV_NO_ADDTL_DELIMITER; - if(pszInputName != NULL) { - free(pszInputName); - pszInputName = NULL; - } - if(pszStrmDrvrAuthMode != NULL) { - free(pszStrmDrvrAuthMode); - pszStrmDrvrAuthMode = NULL; - } + free(pszInputName); + pszInputName = NULL; + free(pszStrmDrvrAuthMode); + pszStrmDrvrAuthMode = NULL; return RS_RET_OK; } |