summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/nsd_ptcp.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/nsd_ptcp.c b/runtime/nsd_ptcp.c
index a212efb0..53b6a3a2 100644
--- a/runtime/nsd_ptcp.c
+++ b/runtime/nsd_ptcp.c
@@ -2,7 +2,7 @@
*
* An implementation of the nsd interface for plain tcp sockets.
*
- * Copyright 2007, 2008 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2007-2013 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of the rsyslog runtime library.
*
@@ -87,10 +87,8 @@ ENDobjConstruct(nsd_ptcp)
BEGINobjDestruct(nsd_ptcp) /* be sure to specify the object type also in END and CODESTART macros! */
CODESTARTobjDestruct(nsd_ptcp)
sockClose(&pThis->sock);
- if(pThis->pRemHostIP != NULL)
- free(pThis->pRemHostIP);
- if(pThis->pRemHostName != NULL)
- free(pThis->pRemHostName);
+ free(pThis->pRemHostIP);
+ free(pThis->pRemHostName);
ENDobjDestruct(nsd_ptcp)