Closed some .xvg files that were being left open
[alexxy/gromacs.git] / src / gromacs / essentialdynamics / edsam.c
index 558eb13dad1be2f3acb3a83e655fc5428761b7ff..35855ffde15a2b9103dd24f1f297baa750d112b1 100644 (file)
@@ -3184,3 +3184,16 @@ void do_edsam(t_inputrec     *ir,
 
     ed->bFirst = FALSE;
 }
+
+void done_ed(gmx_edsam_t *ed)
+{
+    if (*ed)
+    {
+        /* ed->edo is opened sometimes with xvgropen, sometimes with
+         * gmx_fio_fopen, so we use the least common denominator for
+         * closing. */
+        gmx_fio_fclose((*ed)->edo);
+    }
+
+    /* TODO deallocate ed and set pointer to NULL */
+}