Oops - memory leak in urandom reader
authorDan
Thu, 05 Jul 2007 10:52:37 -0400
changeset 45 9cb99e37bfc4
parent 44 90b557e7f12c
child 46 6ddaa9bd7977
Oops - memory leak in urandom reader
includes/rijndael.php
--- a/includes/rijndael.php	Thu Jul 05 10:50:35 2007 -0400
+++ b/includes/rijndael.php	Thu Jul 05 10:52:37 2007 -0400
@@ -877,9 +877,9 @@
       if ( !$ur )
         return $key;
       $ukey = @fread($ur, $len);
+      fclose($ur);
       if ( strlen($ukey) != $len )
         return $key;
-      fclose($ur);
       return $ukey;
     }
     return $key;