cvs: pecl /tidy tidy.c

From: Date: Sun, 14 Nov 2004 13:34:00 +0000
Subject: cvs: pecl /tidy tidy.c
Groups: php.pecl.cvs 
Request: Send a blank email to pecl-cvs+get-2031@lists.php.net to get a copy of this message
tony2001 Sun Nov 14 08:34:00 2004 EDT Modified files: /pecl/tidy tidy.c Log: fix #30780 (tidy segfaults on 'new tidyNode;') http://cvs.php.net/diff.php/pecl/tidy/tidy.c?r1=1.58&r2=1.59&ty=u Index: pecl/tidy/tidy.c diff -u pecl/tidy/tidy.c:1.58 pecl/tidy/tidy.c:1.59 --- pecl/tidy/tidy.c:1.58 Sun Sep 26 15:24:18 2004 +++ pecl/tidy/tidy.c Sun Nov 14 08:33:59 2004 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: tidy.c,v 1.58 2004/09/26 19:24:18 iliaa Exp $ */ +/* $Id: tidy.c,v 1.59 2004/11/14 13:33:59 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.58 2004/09/26 19:24:18 iliaa Exp $)"); + php_info_print_table_row(2, "Extension Version", PHP_TIDY_MODULE_VERSION " ($Id: tidy.c,v 1.59 2004/11/14 13:33:59 tony2001 Exp $)"); php_info_print_table_end(); DISPLAY_INI_ENTRIES();

« previous php.pecl.cvs (#2031) next »