summaryrefslogtreecommitdiffstats
path: root/tcpsrv.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-20 17:35:21 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-20 17:35:21 +0200
commit2aca3c2d33dd1a19daf44168e90a5f64bd4095b0 (patch)
treec7b3052777d85935caf3138d54c4f2aaf1dd1d10 /tcpsrv.c
parent55714cdb440b4baa32f88d55316755555ef93607 (diff)
downloadrsyslog-2aca3c2d33dd1a19daf44168e90a5f64bd4095b0.tar.gz
rsyslog-2aca3c2d33dd1a19daf44168e90a5f64bd4095b0.tar.xz
rsyslog-2aca3c2d33dd1a19daf44168e90a5f64bd4095b0.zip
made imdiag *just* compile & some cleanup
imdiag was never finished (not even really begun), but now I need it. I made the few things that are available compile, but more serious work is required.
Diffstat (limited to 'tcpsrv.c')
-rw-r--r--tcpsrv.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/tcpsrv.c b/tcpsrv.c
index b9434398..7af45d3c 100644
--- a/tcpsrv.c
+++ b/tcpsrv.c
@@ -17,7 +17,7 @@
*
* File begun on 2007-12-21 by RGerhards (extracted from syslogd.c)
*
- * Copyright 2007, 2008 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2007, 2008, 2009 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of rsyslog.
*
@@ -219,8 +219,7 @@ static void deinit_tcp_listener(tcpsrv_t *pThis)
pThis->pSessions = NULL; /* just to make sure... */
}
- if(pThis->TCPLstnPort != NULL)
- free(pThis->TCPLstnPort);
+ free(pThis->TCPLstnPort);
/* finally close our listen streams */
for(i = 0 ; i < pThis->iLstnMax ; ++i) {
@@ -557,12 +556,9 @@ CODESTARTobjDestruct(tcpsrv)
if(pThis->pNS != NULL)
netstrms.Destruct(&pThis->pNS);
- if(pThis->pszDrvrAuthMode != NULL)
- free(pThis->pszDrvrAuthMode);
- if(pThis->ppLstn != NULL)
- free(pThis->ppLstn);
- if(pThis->pszInputName != NULL)
- free(pThis->pszInputName);
+ free(pThis->pszDrvrAuthMode);
+ free(pThis->ppLstn);
+ free(pThis->pszInputName);
ENDobjDestruct(tcpsrv)
@@ -683,8 +679,7 @@ SetInputName(tcpsrv_t *pThis, uchar *name)
pszName = NULL;
else
CHKmalloc(pszName = (uchar*)strdup((char*)name));
- if(pThis->pszInputName != NULL)
- free(pThis->pszInputName);
+ free(pThis->pszInputName);
pThis->pszInputName = pszName;
finalize_it:
RETiRet;