Skip to content

Commit

Permalink
Fix bug #74832, crash in extension loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Pauli committed Jun 29, 2017
1 parent 08089f0 commit 3f4340a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -2028,17 +2028,19 @@ ZEND_API zend_module_entry* zend_register_module_ex(zend_module_entry *module) /
zend_string_release(lcname);
return NULL;
}
zend_string_release(lcname);
module = module_ptr;
EG(current_module) = module;

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

EG(current_module) = NULL;
zend_string_release(lcname);
return module;
}
/* }}} */
Expand Down

0 comments on commit 3f4340a

Please sign in to comment.