From e902474819623e9469f66b6514a8293063ff2b86 Mon Sep 17 00:00:00 2001 From: Darth Vader Date: Fri, 25 Aug 2023 03:29:16 +0000 Subject: [PATCH] Squashed 'phreeqcpp/' changes from 8fa568f..3b5f98c 3b5f98c No memory leaks; Still need to turn-on Fortran git-subtree-dir: phreeqcpp git-subtree-split: 3b5f98c838520da9638d08384186b2c85103ff30 --- common/PHRQ_io.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/common/PHRQ_io.cpp b/common/PHRQ_io.cpp index 15449606..15765fd5 100644 --- a/common/PHRQ_io.cpp +++ b/common/PHRQ_io.cpp @@ -63,6 +63,7 @@ ofstream_open(std::ostream **os, const char *file_name, std::ios_base::openmode std::ofstream *ofs = new std::ofstream(file_name, mode); if (ofs && ofs->is_open()) { + safe_close(os); *os = ofs; return true; }