]> granicus.if.org Git - php/commitdiff
don't leak memory even though the code is not stable yet
authorAntony Dovgal <tony2001@php.net>
Mon, 20 Mar 2006 20:09:20 +0000 (20:09 +0000)
committerAntony Dovgal <tony2001@php.net>
Mon, 20 Mar 2006 20:09:20 +0000 (20:09 +0000)
ext/standard/filters.c

index 88e5d098446a0519f2644d89bcf9c6b069f1527b..7b07514fc884cd0a60b3e6b1fbd6c734f0e5752c 100644 (file)
@@ -50,6 +50,7 @@ static php_stream_filter_status_t strfilter_rot13_filter(
 
                if (bucket->buf_type == IS_UNICODE) {
                        /* rot13 is silly enough, don't apply it to unicode data */
+                       php_stream_bucket_delref(bucket TSRMLS_CC);
                        return PSFS_ERR_FATAL;
                }
                php_strtr(bucket->buf.s, bucket->buflen, rot13_from, rot13_to, 52);
@@ -286,6 +287,7 @@ static php_stream_filter_status_t strfilter_strip_tags_filter(
 
                if (bucket->buf_type == IS_UNICODE) {
                        /* Uh oh! */
+                       php_stream_bucket_delref(bucket TSRMLS_CC);
                        return PSFS_ERR_FATAL;
                }