]> granicus.if.org Git - php/commitdiff
Fixed a crash inside dtor for error handling.
authorIlia Alshanetsky <iliaa@php.net>
Thu, 24 Mar 2011 12:57:38 +0000 (12:57 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Thu, 24 Mar 2011 12:57:38 +0000 (12:57 +0000)
NEWS
main/main.c

diff --git a/NEWS b/NEWS
index 36b9f0eb180b8835f61f2887b9b827cecd4f1e4c..ab461b412f159602f5ab1d37272539ece6b6d50a 100644 (file)
--- 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)
index 3fee30f5ba9292c69747184a0a2b7e6047230745..462ba1a6895988af57a352cc19c9ced4f04d679c 100644 (file)
@@ -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";