[php-src] Issue #11461: FPM: Freeing child allocated data

From: Date: Fri, 16 Jun 2023 14:07:24 +0000
Subject: [php-src] Issue #11461: FPM: Freeing child allocated data
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-244707@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/11461 Author: bukka ### Description FPM allocates some data during child initialization for keeping around some configuration options. This is done in following places: * https://github.com/php/php-src/blob/15184435007ae13d31902be2613632b813b80b0f/sapi/fpm/fpm/fpm_log.c#L81 (this was reported in https://bugs.php.net/bug.php?id=75635 and it is the reason for creating this issue). * https://github.com/php/php-src/blob/15184435007ae13d31902be2613632b813b80b0f/sapi/fpm/fpm/fpm_log.c#L91 * https://github.com/php/php-src/blob/15184435007ae13d31902be2613632b813b80b0f/sapi/fpm/fpm/fpm_status.c#L32 * https://github.com/php/php-src/blob/15184435007ae13d31902be2613632b813b80b0f/sapi/fpm/fpm/fpm_status.c#L40-L41 * https://github.com/php/php-src/blob/15184435007ae13d31902be2613632b813b80b0f/sapi/fpm/fpm/fpm_php.c#L219-L221 (this just takes ownership but means the same sort of leak effectively) 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.

« previous php.bugs (#244707) next »