mirror of
https://github.com/php/php-src.git
synced 2026-03-26 09:12:14 +01:00
MFH: plug memleak
This commit is contained in:
@@ -1216,7 +1216,7 @@ PHPAPI size_t _php_stream_copy_to_mem(php_stream *src, char **buf, size_t maxlen
|
||||
|
||||
p = php_stream_mmap_range(src, php_stream_tell(src), maxlen, PHP_STREAM_MAP_MODE_SHARED_READONLY, &mapped);
|
||||
|
||||
if (p) {
|
||||
if (p && mapped) {
|
||||
*buf = pemalloc_rel_orig(mapped + 1, persistent);
|
||||
|
||||
if (*buf) {
|
||||
|
||||
Reference in New Issue
Block a user