1
0
mirror of https://github.com/php/php-src.git synced 2026-04-18 13:31:27 +02:00

Fixed the memroy leak first (refactor it later)

This commit is contained in:
Xinchen Hui
2014-02-23 21:43:59 +08:00
parent 91e2a91396
commit 70baf8f419

View File

@@ -555,8 +555,9 @@ PHP_FUNCTION(file_get_contents)
}
if ((len = php_stream_copy_to_mem(stream, &contents, maxlen, 0)) > 0) {
//??? RETVAL_STRINGL(contents, len, 0);
//??? RETVAL_STRINGL(contents, len, 0);
RETVAL_STRINGL(contents, len);
efree(contents);
} else if (len == 0) {
RETVAL_EMPTY_STRING();
} else {