tony2001 Tue Oct 3 21:17:29 2006 UTC Modified files: /php-src/ext/pcre php_pcre.c Log: fix leak http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.c?r1=1.204&r2=1.205&diff_format=u Index: php-src/ext/pcre/php_pcre.c diff -u php-src/ext/pcre/php_pcre.c:1.204 php-src/ext/pcre/php_pcre.c:1.205 --- php-src/ext/pcre/php_pcre.c:1.204 Tue Oct 3 20:42:57 2006 +++ php-src/ext/pcre/php_pcre.c Tue Oct 3 21:17:29 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: php_pcre.c,v 1.204 2006/10/03 20:42:57 tony2001 Exp $ */ +/* $Id: php_pcre.c,v 1.205 2006/10/03 21:17:29 tony2001 Exp $ */ /* TODO * php_pcre_replace_impl(): @@ -1861,6 +1861,9 @@ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Matched, but too many substrings"); count = size_offsets/3; } else if (count < 0 && count != PCRE_ERROR_NOMATCH) { + if (Z_TYPE_PP(entry) != IS_STRING) { + zval_dtor(&subject); + } pcre_handle_exec_error(count TSRMLS_CC); break; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php