From: simon Date: Thu, 9 Sep 2010 14:36:46 +0000 (+0000) Subject: Missing close() causing resource leak when reading from /dev/random. X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/commitdiff_plain/3b2ffe3bea3504e907d8f39c473b9895dfd1d08e Missing close() causing resource leak when reading from /dev/random. git-svn-id: svn://svn.tartarus.org/sgt/putty@8991 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/unix/uxgen.c b/unix/uxgen.c index 6c579174..7bed295c 100644 --- a/unix/uxgen.c +++ b/unix/uxgen.c @@ -32,5 +32,7 @@ char *get_random_data(int len) ngot += ret; } + close(fd); + return buf; }