Fixed a crash in the oneway command
[pspp] / src / libpspp / ext-array.c
index b1eded3a3f4d41e658dd2c5aad57d4991e251bc7..57ff8e4a7d6225e3b56c9b71c0760e6e9570f635 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+   Copyright (C) 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -30,6 +30,7 @@
 #include "libpspp/temp-file.h"
 
 #include "gl/error.h"
+#include "gl/unlocked-io.h"
 #include "gl/xalloc.h"
 
 #include "gettext.h"
@@ -68,7 +69,7 @@ ext_array_destroy (struct ext_array *ea)
     {
       ok = !ext_array_error (ea);
       if (ea->file != NULL)
-        fclose (ea->file);
+        close_temp_file (ea->file);
       free (ea);
     }
   return ok;