Commit 420f3dce529 for php.net
commit 420f3dce529e6505d132eab2cf31ab4662c00daf
Author: Niels Dossche <7771979+ndossche@users.noreply.github.com>
Date: Fri Dec 19 14:19:21 2025 -0800
standard: Move freeing of temp buffer and use efree variant (#20738)
diff --git a/ext/standard/file.c b/ext/standard/file.c
index 4168cd0f84b..bd6ee252875 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -663,11 +663,10 @@ PHP_FUNCTION(file)
p = e;
goto parse_eol;
}
- }
- if (target_buf) {
- zend_string_free(target_buf);
+ zend_string_efree(target_buf);
}
+
php_stream_close(stream);
}
/* }}} */