]> granicus.if.org Git - php/commitdiff
- #48752, crash during date parsing with invalid date
authorPierre Joye <pajoye@php.net>
Tue, 27 Oct 2009 10:41:45 +0000 (10:41 +0000)
committerPierre Joye <pajoye@php.net>
Tue, 27 Oct 2009 10:41:45 +0000 (10:41 +0000)
ext/date/php_date.c

index e4771975b1c136fcd1d324b0a56deecf5301b005..d76929f5a11901151c35187c1933405ee9c831b7 100644 (file)
@@ -371,6 +371,7 @@ PHP_RINIT_FUNCTION(date)
        }
        DATEG(timezone) = NULL;
        DATEG(tzcache) = NULL;
+       DATEG(last_errors) = NULL;
 
        return SUCCESS;
 }
@@ -388,6 +389,11 @@ PHP_RSHUTDOWN_FUNCTION(date)
                FREE_HASHTABLE(DATEG(tzcache));
                DATEG(tzcache) = NULL;
        }
+       if (DATEG(last_errors)) {
+               timelib_error_container_dtor(DATEG(last_errors));
+               DATEG(last_errors) = NULL;
+       }
+
        return SUCCESS;
 }
 /* }}} */