-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Description
Description
FPM allocates some data during child initialization for keeping around some configuration options. This is done in following places:
php-src/sapi/fpm/fpm/fpm_log.c
Line 81 in 1518443
fpm_log_format = strdup(wp->config->access_format); php-src/sapi/fpm/fpm/fpm_log.c
Line 91 in 1518443
kvcopy->value = strdup(kv->value); php-src/sapi/fpm/fpm/fpm_status.c
Line 32 in 1518443
fpm_status_uri = strdup(wp->config->pm_status_path); php-src/sapi/fpm/fpm/fpm_status.c
Lines 40 to 41 in 1518443
fpm_status_ping_uri = strdup(wp->config->ping_path); fpm_status_ping_response = strdup(wp->config->ping_response); php-src/sapi/fpm/fpm/fpm_php.c
Lines 219 to 221 in 1518443
/* Take ownership of limit_extensions. */ limit_extensions = wp->limit_extensions; wp->limit_extensions = NULL;
Those values are never freed. They are needed for the whole life of child so it is not a big issue as it gets released on process exit (that's why this is classified more as a feature and not a bug because there is no impact of this). However it is a good convention to free those values so some child destroy functions should be created for that purpose and called before exiting the child.