summaryrefslogtreecommitdiffstats
path: root/stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'stream.c')
-rw-r--r--stream.c19
1 files changed, 3 insertions, 16 deletions
diff --git a/stream.c b/stream.c
index cb6d5e29..0f756d1c 100644
--- a/stream.c
+++ b/stream.c
@@ -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).