From 9323a09b39409387e2141c2ffd845a553817c8b1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 29 Jan 2022 18:12:53 -0500 Subject: [PATCH] reduce number of reported memory leaks with google test death tests --- src/write_dump.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/write_dump.cpp b/src/write_dump.cpp index 53ab80149a..19826eba1b 100644 --- a/src/write_dump.cpp +++ b/src/write_dump.cpp @@ -68,6 +68,7 @@ void WriteDump::command(int narg, char **arg) #undef DUMP_CLASS } else error->all(FLERR,utils::check_packages_for_style("dump",arg[1],lmp)); + delete[] dumpargs; if (modindex < narg) dump->modify_params(narg-modindex-1,&arg[modindex+1]); @@ -89,5 +90,4 @@ void WriteDump::command(int narg, char **arg) // delete the Dump instance and local storage delete dump; - delete [] dumpargs; }