#37864 [Opn->Csd]: file_get_contents leaks memory on empty file
| From: | bjori@php.net | Date: | Tue, 20 Jun 2006 19:25:11 +0000 |
| Subject: | #37864 [Opn->Csd]: file_get_contents leaks memory on empty file | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-98605@lists.php.net to get a copy of this message | ||
ID: 37864
Updated by: bjori@php.net
Reported By: bjori@php.net
-Status: Open
+Status: Closed
Bug Type: Streams related
Operating System: FreeBSD
PHP Version: 5.1.4
-Assigned To:
+Assigned To: bjori
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
fixed in HEAD & 5_2
Previous Comments:
------------------------------------------------------------------------
[2006-06-20 19:24:24] bjori@php.net
Description:
------------
file_get_contents() leaks on empty file
Reproduce code:
---------------
bjori@lindsay php-5.1.4$ touch emptyfile
bjori@lindsay php-5.1.4$ sapi/cli/php -r
'file_get_contents("emptyfile");'
Actual result:
--------------
[Tue Jun 20 21:22:13 2006] Script: '-'
/usr/home/bjori/php-5.1.4/main/streams/streams.c(1220) :
Freeing 0x082B07E4 (1 bytes), script=-
/usr/home/bjori/php-5.1.4/ext/standard/file.c(543) : Actual
location (location was relayed)
=== Total 1 memory leaks detected ===
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=37864&edit=1