Missing close() causing resource leak when reading from /dev/random.
authorsimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 9 Sep 2010 14:36:46 +0000 (14:36 +0000)
committersimon <simon@cda61777-01e9-0310-a592-d414129be87e>
Thu, 9 Sep 2010 14:36:46 +0000 (14:36 +0000)
git-svn-id: svn://svn.tartarus.org/sgt/putty@8991 cda61777-01e9-0310-a592-d414129be87e

unix/uxgen.c

index 6c57917..7bed295 100644 (file)
@@ -32,5 +32,7 @@ char *get_random_data(int len)
        ngot += ret;
     }
 
+    close(fd);
+
     return buf;
 }