From 90ccb6dc2bfcd1b2fa9aa0492f4553cf4f598f49 Mon Sep 17 00:00:00 2001 From: Darth Vader Date: Fri, 25 Aug 2023 03:28:29 +0000 Subject: [PATCH] Squashed 'src/' changes from 8da0b219..0cb7f629 0cb7f629 No memory leaks; Still need to turn-on Fortran git-subtree-dir: src git-subtree-split: 0cb7f629943a58c808f22ad2d8f169f83beb38ff --- phreeqcpp/common/PHRQ_io.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/phreeqcpp/common/PHRQ_io.cpp b/phreeqcpp/common/PHRQ_io.cpp index 15449606..15765fd5 100644 --- a/phreeqcpp/common/PHRQ_io.cpp +++ b/phreeqcpp/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; }