summaryrefslogtreecommitdiff
path: root/Zend
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 /Zend
parent1b13ff6ec7969999052ed1b5315f8651b633a617 (diff)
downloadphp-git-4c6678d6058fd740a9e186b49f9daa72d09ed300.tar.gz
Fixed bug #63093 (Segfault while load extension failed in zts-build).
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend_API.c4
1 files changed, 3 insertions, 1 deletions
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);