mongodb/mongo-php-driver — pull request #275 by bjori (2013-01-18 19:09:43+00:00)
Title: Fixed PHP-672: MongoGridFSFile::write() leaks memory

return_value seems to have been just a handy variable to use here, but
its really confusing as its later overwritten with a long, without
freeing the previously assigned data.
Using a real temp variable fixes the leak