summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinchen Hui <laruence@php.net>2012-09-15 11:50:16 +0800
committerXinchen Hui <laruence@php.net>2012-09-15 11:50:16 +0800
commit4c6678d6058fd740a9e186b49f9daa72d09ed300 (patch)
tree322698b854946933936b84d847bee8e592a47a27
parent1b13ff6ec7969999052ed1b5315f8651b633a617 (diff)
downloadphp-git-4c6678d6058fd740a9e186b49f9daa72d09ed300.tar.gz
Fixed bug #63093 (Segfault while load extension failed in zts-build).
-rw-r--r--NEWS2
-rw-r--r--Zend/zend_API.c4
2 files changed, 5 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 7e52997f59..181e66d388 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,8 @@ PHP NEWS
?? ??? 2012, PHP 5.3.18
- Core:
+ . Fixed bug #63093 (Segfault while load extension failed in zts-build).
+ (Laruence)
. Fixed bug #62976 (Notice: could not be converted to int when comparing
some builtin classes). (Laruence)
. Fixed bug #61767 (Shutdown functions not called in certain error
diff --git a/Zend/zend_API.c b/Zend/zend_API.c
index 70cf0c7af8..cf96743ee2 100644
--- a/Zend/zend_API.c
+++ b/Zend/zend_API.c
@@ -2122,7 +2122,9 @@ void module_destructor(zend_module_entry *module) /* {{{ */
/* Deinitilaise module globals */
if (module->globals_size) {
#ifdef ZTS
- ts_free_id(*module->globals_id_ptr);
+ if (*module->globals_id_ptr) {
+ ts_free_id(*module->globals_id_ptr);
+ }
#else
if (module->globals_dtor) {
module->globals_dtor(module->globals_ptr TSRMLS_CC);