mirror of
https://github.com/php/php-src.git
synced 2024-11-23 18:04:36 +08:00
Merge branch 'PHP-7.4'
This commit is contained in:
commit
ac749b126f
@ -104,7 +104,10 @@ static void _close_ldap_link(zend_resource *rsrc) /* {{{ */
|
||||
{
|
||||
ldap_linkdata *ld = (ldap_linkdata *)rsrc->ptr;
|
||||
|
||||
ldap_unbind_ext(ld->link, NULL, NULL);
|
||||
/* We use ldap_destroy rather than ldap_unbind here, because ldap_unbind
|
||||
* will skip the destructor entirely if a critical client control is set. */
|
||||
ldap_destroy(ld->link);
|
||||
|
||||
#if defined(LDAP_API_FEATURE_X_OPENLDAP) && defined(HAVE_3ARG_SETREBINDPROC)
|
||||
zval_ptr_dtor(&ld->rebindproc);
|
||||
#endif
|
||||
|
@ -1483,7 +1483,7 @@ PHP_METHOD(SoapServer, handle)
|
||||
int soap_version, old_soap_version;
|
||||
sdlPtr old_sdl = NULL;
|
||||
soapServicePtr service;
|
||||
xmlDocPtr doc_request=NULL, doc_return;
|
||||
xmlDocPtr doc_request = NULL, doc_return = NULL;
|
||||
zval function_name, *params, *soap_obj, retval;
|
||||
char *fn_name, cont_len[30];
|
||||
int num_params = 0, size, i, call_status = 0;
|
||||
@ -1758,8 +1758,6 @@ PHP_METHOD(SoapServer, handle)
|
||||
}
|
||||
}
|
||||
|
||||
doc_return = NULL;
|
||||
|
||||
/* Process soap headers */
|
||||
if (soap_headers != NULL) {
|
||||
soapHeader *header = soap_headers;
|
||||
@ -1911,8 +1909,6 @@ PHP_METHOD(SoapServer, handle)
|
||||
sapi_add_header("Content-Type: text/xml; charset=utf-8", sizeof("Content-Type: text/xml; charset=utf-8")-1, 1);
|
||||
}
|
||||
|
||||
xmlFreeDoc(doc_return);
|
||||
|
||||
if (zend_ini_long("zlib.output_compression", sizeof("zlib.output_compression"), 0)) {
|
||||
sapi_add_header("Connection: close", sizeof("Connection: close")-1, 1);
|
||||
} else {
|
||||
@ -1934,6 +1930,10 @@ fail:
|
||||
SOAP_GLOBAL(typemap) = old_typemap;
|
||||
SOAP_GLOBAL(features) = old_features;
|
||||
|
||||
if (doc_return) {
|
||||
xmlFreeDoc(doc_return);
|
||||
}
|
||||
|
||||
/* Free soap headers */
|
||||
zval_ptr_dtor(&retval);
|
||||
while (soap_headers != NULL) {
|
||||
|
@ -197,6 +197,9 @@ static void fpm_php_cleanup(int which, void *arg) /* {{{ */
|
||||
{
|
||||
php_module_shutdown();
|
||||
sapi_shutdown();
|
||||
if (limit_extensions) {
|
||||
fpm_worker_pool_free_limit_extensions(limit_extensions);
|
||||
}
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
@ -223,7 +226,9 @@ int fpm_php_init_child(struct fpm_worker_pool_s *wp) /* {{{ */
|
||||
}
|
||||
|
||||
if (wp->limit_extensions) {
|
||||
/* Take ownership of limit_extensions. */
|
||||
limit_extensions = wp->limit_extensions;
|
||||
wp->limit_extensions = NULL;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -17,6 +17,15 @@
|
||||
|
||||
struct fpm_worker_pool_s *fpm_worker_all_pools;
|
||||
|
||||
void fpm_worker_pool_free_limit_extensions(char **limit_extensions) {
|
||||
char **ext = limit_extensions;
|
||||
while (*ext) {
|
||||
free(*ext);
|
||||
ext++;
|
||||
}
|
||||
free(limit_extensions);
|
||||
}
|
||||
|
||||
void fpm_worker_pool_free(struct fpm_worker_pool_s *wp) /* {{{ */
|
||||
{
|
||||
if (wp->config) {
|
||||
@ -28,6 +37,9 @@ void fpm_worker_pool_free(struct fpm_worker_pool_s *wp) /* {{{ */
|
||||
if (wp->home) {
|
||||
free(wp->home);
|
||||
}
|
||||
if (wp->limit_extensions) {
|
||||
fpm_worker_pool_free_limit_extensions(wp->limit_extensions);
|
||||
}
|
||||
fpm_unix_free_socket_premissions(wp);
|
||||
free(wp);
|
||||
}
|
||||
|
@ -50,6 +50,8 @@ struct fpm_worker_pool_s *fpm_worker_pool_alloc();
|
||||
void fpm_worker_pool_free(struct fpm_worker_pool_s *wp);
|
||||
int fpm_worker_pool_init_main();
|
||||
|
||||
void fpm_worker_pool_free_limit_extensions(char **limit_extensions);
|
||||
|
||||
extern struct fpm_worker_pool_s *fpm_worker_all_pools;
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user