diff options
Diffstat (limited to 'usr.bin/random')
-rw-r--r-- | usr.bin/random/randomize_fd.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.bin/random/randomize_fd.c b/usr.bin/random/randomize_fd.c index 622bfc0..684c84e 100644 --- a/usr.bin/random/randomize_fd.c +++ b/usr.bin/random/randomize_fd.c @@ -199,17 +199,14 @@ make_token: } } - if (fd >= 0) { - (void)close(fd); - fd = -1; - } - /* Necessary evil to compensate for files that don't end with a newline */ if (bufc != i) { i--; goto make_token; } + (void)close(fd); + free(buf); for (i = numnode; i > 0; i--) { |