From c0743225e859d2abed24cf8dbb9f9125e49aeb6e Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 18 Jan 2013 16:17:28 +0100 Subject: refactor / simplify --- runtime/nsd_ptcp.c | 8 +++----- 1 file 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) -- cgit v1.2.3