]> hackdaworld.org Git - physik/posic.git/commitdiff
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 ddbd7b5effbd86f02dd15f9f78d54d1a0a81ebe0..df779809b5a34b627eb6ccfe35ad03835f709952 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;
 }