diff --git a/NEWS b/NEWS index c7bd9e834d1..3d0d3057fc8 100644 --- a/NEWS +++ b/NEWS @@ -46,6 +46,9 @@ PHP NEWS (ilutov) . Fix theoretical issues with hrtime() not being available. (nielsdos) +- Windows: + . Free opened_path when opened_path_len >= MAXPATHLEN. (dixyes) + 31 Jul 2025, PHP 8.4.11 - Calendar: diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index b45537935a5..3a410eb7fa2 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -186,6 +186,7 @@ static int php_do_open_temporary_file(const char *path, const char *pfx, zend_st free(random_prefix_w); efree(random_prefix); efree(new_state.cwd); + free(opened_path); return -1; } assert(strlen(opened_path) == opened_path_len);