diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-23 14:29:41 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-04-23 14:29:41 +0200 |
commit | 6c5264159c099ddc4d06590508980ee53a83b67b (patch) | |
tree | ec209c9bdd5d735bc36d504a8c5025d00e1b2b46 /runtime/wti.c | |
parent | 31ba42de664341c0c25236c619c7e1eb81f71d1d (diff) | |
download | rsyslog-6c5264159c099ddc4d06590508980ee53a83b67b.tar.gz rsyslog-6c5264159c099ddc4d06590508980ee53a83b67b.tar.xz rsyslog-6c5264159c099ddc4d06590508980ee53a83b67b.zip |
fixing a small (newly-introduced) memory leak
... plus simplifying free() calls after agreement on mailing list
that we no longer need to check if the pointer is non-NULL
Diffstat (limited to 'runtime/wti.c')
-rw-r--r-- | runtime/wti.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/runtime/wti.c b/runtime/wti.c index df1ea0ed..32eab57c 100644 --- a/runtime/wti.c +++ b/runtime/wti.c @@ -201,11 +201,9 @@ CODESTARTobjDestruct(wti) pthread_cond_destroy(&pThis->condExitDone); pthread_mutex_destroy(&pThis->mut); - if(pThis->paUsrp != NULL) - free(pThis->paUsrp); - - if(pThis->pszDbgHdr != NULL) - free(pThis->pszDbgHdr); + free(pThis->paUsrp->pUsrp); + free(pThis->paUsrp); + free(pThis->pszDbgHdr); ENDobjDestruct(wti) |