Fixes for coverity warnings.
diff --git a/src/spell.c b/src/spell.c
index 6d4d47e..30510ad 100644
--- a/src/spell.c
+++ b/src/spell.c
@@ -9439,7 +9439,8 @@
 		    fseek(fd, fpos_next, SEEK_SET);
 		}
 	    }
-	    fclose(fd);
+	    if (fd != NULL)
+		fclose(fd);
 	}
     }