mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-07 17:27:30 +00:00
MFH: plug memleak
This commit is contained in:
1 parent
c14ba0f124
commit
c4154145df
1 file changed
+1
-1
@@ -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