Fixed a bug which caused a crash when reading non-existent files.
[pspp] / src / glob.c
index 457be8ace071b856fff5cd17d5fc5dd94d14bd16..9cbcc0c6761602a86316f6d538b901b3248e876a 100644 (file)
@@ -127,6 +127,7 @@ init_glob (int argc UNUSED, char **argv)
 #endif /* ENABLE_NLS */
 
   fn_init ();
+  fh_init ();
   getl_initialize ();
 
   /* PORTME: If your system/OS has the nasty tendency to halt with a
@@ -183,10 +184,13 @@ init_glob (int argc UNUSED, char **argv)
 void
 done_glob(void)
 {
-  dict_destroy(default_dict);
-  free(logfn);
-  done_settings();
+  cancel_transformations ();
+  dict_destroy (default_dict);
+  free (logfn);
+  done_settings ();
   ds_destroy (&tokstr);
+
+  fh_done();
 }
 
 static void