From b064810550caa492cb0dd4ae973c033e0cefa55c Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Tue, 7 Jan 2003 22:53:42 +0000 Subject: [PATCH] Instances should not be freed in dtor()... --- ext/standard/filters.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 2415ee934d..bb0a0b8dbf 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -265,8 +265,7 @@ static int php_base64_filter_ctor(php_base64_filter *inst) static void php_base64_filter_dtor(php_base64_filter *inst) { - assert(inst != NULL); - efree(inst); + /* do nothing */ } static size_t strfilter_base64_write(php_stream *stream, php_stream_filter *thisfilter, @@ -448,6 +447,9 @@ static int strfilter_base64_eof(php_stream *stream, php_stream_filter *thisfilte static void strfilter_base64_dtor(php_stream_filter *thisfilter TSRMLS_DC) { php_base64_filter_dtor((php_base64_filter *)thisfilter->abstract); + + assert(thisfilter->abstract != NULL); + efree(thisfilter->abstract); } static php_stream_filter_ops strfilter_base64_ops = { -- 2.50.1