Fix memory leak on invalid port

Closes GH-7911.
This commit is contained in:
David Carlier 2022-01-08 07:48:28 +00:00 committed by Christoph M. Becker
parent 9781085782
commit c99a026c9c
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6
2 changed files with 4 additions and 0 deletions

3
NEWS
View file

@ -2,6 +2,9 @@ PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? ??? 2022, PHP 8.0.16
- FPM:
. Fixed memory leak on invalid port. (David Carlier)
- Sockets:
. Fixed ext/sockets build on Haiku. (David Carlier)

View file

@ -336,6 +336,7 @@ static int fpm_socket_af_inet_listening_socket(struct fpm_worker_pool_s *wp) /*
if (port == 0) {
zlog(ZLOG_ERROR, "invalid port value '%s'", port_str);
free(dup_address);
return -1;
}