Skip to content

Commit 3f4340a

Browse files
author
Julien Pauli
committed
Fix bug #74832, crash in extension loading
1 parent 08089f0 commit 3f4340a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Zend/zend_API.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2028,17 +2028,19 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /
20282028
zend_string_release(lcname);
20292029
return NULL;
20302030
}
2031-
zend_string_release(lcname);
20322031
module = module_ptr;
20332032
EG(current_module) = module;
20342033

20352034
if (module->functions && zend_register_functions(NULL, module->functions, NULL, module->type)==FAILURE) {
2035+
zend_hash_del(&module_registry, lcname);
2036+
zend_string_release(lcname);
20362037
EG(current_module) = NULL;
20372038
zend_error(E_CORE_WARNING,"%s: Unable to register functions, unable to load", module->name);
20382039
return NULL;
20392040
}
20402041

20412042
EG(current_module) = NULL;
2043+
zend_string_release(lcname);
20422044
return module;
20432045
}
20442046
/* }}} */

0 commit comments

Comments
 (0)