diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-24 10:54:51 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-04-24 10:54:51 +0200 |
commit | 0e19d501bbf4d96bc622436a161b57ff7445a657 (patch) | |
tree | e27819242c00bf3b5f15226203d4b696cc4cb61d /runtime | |
parent | bf3d2c1b392af1383a3cdc247f2280fd31a12699 (diff) | |
download | rsyslog-0e19d501bbf4d96bc622436a161b57ff7445a657.tar.gz rsyslog-0e19d501bbf4d96bc622436a161b57ff7445a657.tar.xz rsyslog-0e19d501bbf4d96bc622436a161b57ff7445a657.zip |
fixed newly introduced memory leaks
Diffstat (limited to 'runtime')
-rw-r--r-- | runtime/nsd_ptcp.c | 2 | ||||
-rw-r--r-- | runtime/nssel.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/runtime/nsd_ptcp.c b/runtime/nsd_ptcp.c index 8dbc80d9..8ab2ccf7 100644 --- a/runtime/nsd_ptcp.c +++ b/runtime/nsd_ptcp.c @@ -259,7 +259,6 @@ LstnInit(netstrms_t *pNS, void *pUsr, rsRetVal(*fAddLstn)(void*,netstrm_t*), uchar *pLstnPort, uchar *pLstnIP, int iSessMax) { DEFiRet; - nsd_ptcp_t **arrLstn = NULL; netstrm_t *pNewStrm = NULL; nsd_t *pNewNsd = NULL; int error, maxs, on = 1; @@ -289,7 +288,6 @@ LstnInit(netstrms_t *pNS, void *pUsr, rsRetVal(*fAddLstn)(void*,netstrm_t*), /* Count max number of sockets we may open */ for(maxs = 0, r = res; r != NULL ; r = r->ai_next, maxs++) /* EMPTY */; - CHKmalloc(arrLstn = (nsd_ptcp_t**) malloc((maxs+1) * sizeof(nsd_ptcp_t*))); numSocks = 0; /* num of sockets counter at start of array */ for(r = res; r != NULL ; r = r->ai_next) { diff --git a/runtime/nssel.c b/runtime/nssel.c index c4f6691e..7cb63e98 100644 --- a/runtime/nssel.c +++ b/runtime/nssel.c @@ -89,6 +89,8 @@ ENDobjConstruct(nssel) /* destructor for the nssel object */ BEGINobjDestruct(nssel) /* be sure to specify the object type also in END and CODESTART macros! */ CODESTARTobjDestruct(nssel) + if(pThis->pDrvrData != NULL) + pThis->Drvr.Destruct(&pThis->pDrvrData); ENDobjDestruct(nssel) |