cvs: php-src(PHP_5_0) /ext/tidy tidy.c

From: Date: Sun, 14 Nov 2004 13:35:48 +0000
Subject: cvs: php-src(PHP_5_0) /ext/tidy tidy.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-29188@lists.php.net to get a copy of this message
tony2001 Sun Nov 14 08:35:48 2004 EDT Modified files: (Branch: PHP_5_0) /php-src/ext/tidy tidy.c Log: MFH: fix #30780 (tidy segfaults on 'new tidyNode;') http://cvs.php.net/diff.php/php-src/ext/tidy/tidy.c?r1=1.56.2.2&r2=1.56.2.3&ty=u Index: php-src/ext/tidy/tidy.c diff -u php-src/ext/tidy/tidy.c:1.56.2.2 php-src/ext/tidy/tidy.c:1.56.2.3 --- php-src/ext/tidy/tidy.c:1.56.2.2 Sun Sep 26 15:24:20 2004 +++ php-src/ext/tidy/tidy.c Sun Nov 14 08:35:48 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tidy.c,v 1.56.2.2 2004/09/26 19:24:20 iliaa Exp $ */ +/* $Id: tidy.c,v 1.56.2.3 2004/11/14 13:35:48 tony2001 Exp $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -497,13 +497,15 @@ zend_hash_destroy(intern->std.properties); FREE_HASHTABLE(intern->std.properties); - intern->ptdoc->ref_count--; + if (intern->ptdoc) { + intern->ptdoc->ref_count--; - if (intern->ptdoc->ref_count <= 0) { - tidyBufFree(intern->ptdoc->errbuf); - efree(intern->ptdoc->errbuf); - tidyRelease(intern->ptdoc->doc); - efree(intern->ptdoc); + if (intern->ptdoc->ref_count <= 0) { + tidyBufFree(intern->ptdoc->errbuf); + efree(intern->ptdoc->errbuf); + tidyRelease(intern->ptdoc->doc); + efree(intern->ptdoc); + } } efree(object); @@ -952,7 +954,7 @@ php_info_print_table_start(); php_info_print_table_header(2, "Tidy support", "enabled"); php_info_print_table_row(2, "libTidy Release", (char *)tidyReleaseDate()); - php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.56.2.2 2004/09/26 19:24:20 iliaa Exp $)"); + php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.56.2.3 2004/11/14 13:35:48 tony2001 Exp $)"); php_info_print_table_end(); DISPLAY_INI_ENTRIES();

« previous php.cvs (#29188) next »