diff options
author | Michael Biebl <biebl@debian.org> | 2008-12-11 19:41:37 +0100 |
---|---|---|
committer | Michael Biebl <biebl@debian.org> | 2008-12-11 19:41:37 +0100 |
commit | 53123ea8a1b9180b9aa0568e847f9245987c1b7c (patch) | |
tree | ada91ea2b1275ed9dca2d916934e385fe11df07e /tcpsrv.c | |
parent | c16d7e48359ded62765f551d05d9b289240a2ec1 (diff) | |
download | rsyslog-53123ea8a1b9180b9aa0568e847f9245987c1b7c.tar.gz |
Imported Upstream version 3.18.6upstream/3.18.6
Diffstat (limited to 'tcpsrv.c')
-rw-r--r-- | tcpsrv.c | 10 |
1 files changed, 4 insertions, 6 deletions
@@ -415,7 +415,7 @@ static rsRetVal SessAccept(tcpsrv_t *pThis, tcps_sess_t **ppSess, int fd) { DEFiRet; - tcps_sess_t *pSess; + tcps_sess_t *pSess = NULL; int newConn; int iSess = -1; struct sockaddr_storage addr; @@ -464,8 +464,6 @@ SessAccept(tcpsrv_t *pThis, tcps_sess_t **ppSess, int fd) * configured to do this). * rgerhards, 2005-09-26 */ -RUNLOG_VAR("%p", ppSess); -RUNLOG_VAR("%p", pSess); if(!pThis->pIsPermittedHost((struct sockaddr*) &addr, (char*) fromHostFQDN, pThis->pUsr, pSess->pUsr)) { dbgprintf("%s is not an allowed sender\n", (char *) fromHostFQDN); if(option_DisallowWarning) { @@ -492,12 +490,12 @@ RUNLOG_VAR("%p", pSess); *ppSess = pSess; pThis->pSessions[iSess] = pSess; + pSess = NULL; finalize_it: if(iRet != RS_RET_OK) { - if(iSess != -1) { - if(pThis->pSessions[iSess] != NULL) - tcps_sess.Destruct(&pThis->pSessions[iSess]); + if(pSess != NULL) { + tcps_sess.Destruct(&pSess); } iSess = -1; // TODO: change this to be fully iRet compliant ;) } |