]> granicus.if.org Git - php/commitdiff
don't leave garbage in tmp dir
authorAntony Dovgal <tony2001@php.net>
Tue, 20 Jun 2006 18:55:46 +0000 (18:55 +0000)
committerAntony Dovgal <tony2001@php.net>
Tue, 20 Jun 2006 18:55:46 +0000 (18:55 +0000)
ext/standard/tests/file/file_get_contents.phpt

index 1a7b2eb885eef6c90ce21808cfefe64eca48b75c..9fd762a114bdbbf6a8cc310ca82cd9a4fb124905 100644 (file)
@@ -2,8 +2,9 @@
 file_get_contents() leaks on empty file
 --FILE--
 <?php
-    $tmpfname = tempnam("/tmp", "emptyfile");
-    echo file_get_contents($tmpfname), "done.";
+       $tmpfname = tempnam("/tmp", "emptyfile");
+       echo file_get_contents($tmpfname), "done.";
+       unlink($tmpfname);
 ?>
 --EXPECT--
 done.