from George Bergman (gbergman@cartan.berkeley)
[unix-history] / usr / src / usr.bin / spell / spell.c
index ba60688..e01bcf3 100644 (file)
@@ -1,5 +1,5 @@
 #ifndef lint
 #ifndef lint
-static char sccsid[] = "@(#)spell.c    4.1 %G%";
+static char sccsid[] = "@(#)spell.c    4.2 %G%";
 #endif
 
 #include "spell.h"
 #endif
 
 #include "spell.h"
@@ -154,8 +154,10 @@ char **argv;
                affix[0] = 0;
                file = found;
                for(ep=word;(*ep=j=getchar())!='\n';ep++)
                affix[0] = 0;
                file = found;
                for(ep=word;(*ep=j=getchar())!='\n';ep++)
-                       if(j == EOF)
+                       if(j == EOF) {
+                               fclose(found);
                                exit(0);
                                exit(0);
+                       }
                for(cp=word,dp=original; cp<ep; )
                        *dp++ = *cp++;
                *dp = 0;
                for(cp=word,dp=original; cp<ep; )
                        *dp++ = *cp++;
                *dp = 0;