corrected random fd close
authorhackbard <hackbard>
Thu, 28 Jun 2007 06:58:40 +0000 (06:58 +0000)
committerhackbard <hackbard>
Thu, 28 Jun 2007 06:58:40 +0000 (06:58 +0000)
random/random.c

index ddbd7b5..df77980 100644 (file)
@@ -55,7 +55,7 @@ int rand_close(t_random *random) {
 
        if(random->buffer) free(random->buffer);
        if(random->fd) close(random->fd);
-       if(random->logfd) close(random->logfd);
+       if(random->logfd>2) close(random->logfd); // could be stdo/e
 
        return 0;
 }