diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-30 08:02:42 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-30 08:02:42 +0000 |
commit | 4984c1ba6c84a3ae91f9afd4da2ea718c98c97a7 (patch) | |
tree | 39972db40d9d0f642879a663aadcad996a510e50 /stream.c | |
parent | ef44f5c9ba319e2813e5ea23b2699b73b63cdcbb (diff) | |
download | rsyslog-4984c1ba6c84a3ae91f9afd4da2ea718c98c97a7.tar.gz rsyslog-4984c1ba6c84a3ae91f9afd4da2ea718c98c97a7.tar.xz rsyslog-4984c1ba6c84a3ae91f9afd4da2ea718c98c97a7.zip |
- renamed Msg object to usual all-lowercase object name (else we ran into
troubles with the framework, also it was somewhat ugly...)
- fixed a memory leak in object destruction (was recently introduced by
object naming, not present in any released version)
Diffstat (limited to 'stream.c')
-rw-r--r-- | stream.c | 19 |
1 files changed, 3 insertions, 16 deletions
@@ -324,15 +324,8 @@ finalize_it: /* destructor for the strm object */ -rsRetVal strmDestruct(strm_t **ppThis) -{ - strm_t *pThis; - DEFiRet; - - assert(ppThis != NULL); - pThis = *ppThis; - ISOBJ_TYPE_assert(pThis, strm); - +BEGINobjDestruct(strm) /* be sure to specify the object type also in END and CODESTART macros! */ +CODESTARTobjDestruct(strm) if(pThis->tOperationsMode == STREAMMODE_WRITE) strmFlush(pThis); @@ -342,13 +335,7 @@ rsRetVal strmDestruct(strm_t **ppThis) if(pThis->pszDir != NULL) free(pThis->pszDir); - - /* and finally delete the strm objet itself */ - free(pThis); - *ppThis = NULL; - - RETiRet; -} +ENDobjDestruct(strm) /* check if we need to open a new file (in output mode only). |