diff --git a/src/libnptm/Configuration.cpp b/src/libnptm/Configuration.cpp
index 6f36e84ff12defdd3cb078f333e31c23ea2be0fa..286e33f7914ce1bf2bba8a35e08b6a0598021ff1 100644
--- a/src/libnptm/Configuration.cpp
+++ b/src/libnptm/Configuration.cpp
@@ -12,7 +12,7 @@
    
    A copy of the GNU General Public License is distributed along with
    this program in the COPYING file. If not, see: <https://www.gnu.org/licenses/>.
- */
+*/
 
 /*! \file Configuration.cpp
  *
@@ -856,6 +856,7 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(const std::string& fil
     } // di loop
     delete[] elements;
     status = hdf_file->close();
+    delete hdf_file;
     conf = new ScattererConfiguration(
 				      nsph,
 				      configuration_count,
@@ -872,9 +873,9 @@ ScattererConfiguration* ScattererConfiguration::from_hdf5(const std::string& fil
 				      _exdc,
 				      _wp,
 				      _xip
-				      );
+    );
+    delete[] xi_vec;
   }
-  
   return conf;
 }
 
diff --git a/src/trapping/clffft.cpp b/src/trapping/clffft.cpp
index b36383756520522b7ff8f7e10f7a65626b677150..46828b2ddfb1d5de61249f6a570fa704dfc1f9e5 100644
--- a/src/trapping/clffft.cpp
+++ b/src/trapping/clffft.cpp
@@ -326,15 +326,18 @@ void lffft(string data_file, string output_path) {
 		if (is != 2222) {
 		  if (is != 1111) {
 		    if (is > 0) { // Goes to 305
+		      if (ac) delete[] ac;
 		      ac = new dcomplex[cil->nlemt]();
 		      camp(ac, am0m, ws, cil);
 		      // Goes to 445
 		    } else if (is < 0) { // Goes to 405
+		      if (ac) delete[] ac;
 		      ac = new dcomplex[cil->nlemt]();
 		      czamp(ac, amd, indam, ws, cil);
 		      // Goes to 445
 		    }
 		  } else {
+		    if (ac) delete[] ac;
 		    ac = new dcomplex[cil->nlemt]();
 		    samp(ac, tmsm, tmse, ws, cil);
 		    // Goes to 445