Ooops, did a mistake. Fixed by Arkadiusz Miskiewicz.
authorRicardo Cruz <rick2@aeiou.pt>
Sun, 25 Apr 2004 14:16:10 +0000 (14:16 +0000)
committerRicardo Cruz <rick2@aeiou.pt>
Sun, 25 Apr 2004 14:16:10 +0000 (14:16 +0000)
Aparentaly, fclose(NULL) causes a segfault.

SVN-Revision: 704

src/lispreader.cpp

index 4dc6d4f..30b3802 100644 (file)
@@ -1339,11 +1339,11 @@ lisp_object_t* lisp_read_from_file(const std::string& filename)
         {
           lisp_stream_init_file(&stream, in);
           obj = lisp_read(&stream);
+          fclose(in);
         }
       else
         std::cerr << "LispReader: File not found: " << filename << endl;
 
-      fclose(in);
 
       return obj;
     }