From: Moriyoshi Koizumi Date: Tue, 7 Jan 2003 22:53:42 +0000 (+0000) Subject: Instances should not be freed in dtor()... X-Git-Tag: PHP_5_0_dev_before_13561_fix~390 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b064810550caa492cb0dd4ae973c033e0cefa55c;p=php Instances should not be freed in dtor()... --- 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 = {