From: Ilia Alshanetsky Date: Thu, 24 Mar 2011 12:57:38 +0000 (+0000) Subject: Fixed a crash inside dtor for error handling. X-Git-Tag: php-5.3.7RC1~212 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f2ce3e0201c8d7eed3c940cb63d87b4b91bdee23;p=php Fixed a crash inside dtor for error handling. --- diff --git a/NEWS b/NEWS index 36b9f0eb18..ab461b412f 100644 --- a/NEWS +++ b/NEWS @@ -8,6 +8,7 @@ PHP NEWS - Core: . Fixed bug #54180 (parse_url() incorrectly parses path when ? in fragment). (tomas dot brastavicius at quantum dot lt, Pierrick) + . Fixed a crash inside dtor for error handling. (Ilia) - DateTime extension: . Fixed bug #54340 (DateTime::add() method bug). (Adam) diff --git a/main/main.c b/main/main.c index 3fee30f5ba..462ba1a689 100644 --- a/main/main.c +++ b/main/main.c @@ -908,9 +908,11 @@ static void php_error_cb(int type, const char *error_filename, const uint error_ if (display) { if (PG(last_error_message)) { free(PG(last_error_message)); + PG(last_error_message) = NULL; } if (PG(last_error_file)) { free(PG(last_error_file)); + PG(last_error_file) = NULL; } if (!error_filename) { error_filename = "Unknown";