Clean up grompp memory leaks in rotation and pull structures.
[alexxy/gromacs.git] / src / gromacs / tools / check.cpp
index 684c6ca6a277ab3dbfac31198f8a137c55ad2f05..5aa81509a78d80ed329d127eb340d7fb0b3366d7 100644 (file)
@@ -130,6 +130,8 @@ static void comp_tpx(const char* fn1, const char* fn2, gmx_bool bRMSD, real ftol
             compareMtopAB(stdout, mtop[0], ftol, abstol);
         }
     }
+    delete ir[0];
+    delete ir[1];
 }
 
 static void comp_trx(const gmx_output_env_t* oenv, const char* fn1, const char* fn2, gmx_bool bRMSD, real ftol, real abstol)
@@ -815,6 +817,7 @@ int gmx_check(int argc, char* argv[])
     {
         fprintf(stderr, "Please give me TWO trajectory (.xtc/.trr/.tng) files!\n");
     }
+    output_env_done(oenv);
 
     fn1 = opt2fn_null("-s1", NFILE, fnm);
     fn2 = opt2fn_null("-s2", NFILE, fnm);