diff --git a/unittest/force-styles/angle_style.cpp b/unittest/force-styles/angle_style.cpp index b38d23ce55..dd4588fa74 100644 --- a/unittest/force-styles/angle_style.cpp +++ b/unittest/force-styles/angle_style.cpp @@ -87,8 +87,8 @@ LAMMPS *init_lammps(int argc, char **argv, const TestConfig &cfg, const bool new if (!info->has_style(prerequisite.first, style)) ++nfail; } + delete info; if (nfail > 0) { - delete info; cleanup_lammps(lmp, cfg); return nullptr; } diff --git a/unittest/force-styles/bond_style.cpp b/unittest/force-styles/bond_style.cpp index c2db3b608b..7ba4a08705 100644 --- a/unittest/force-styles/bond_style.cpp +++ b/unittest/force-styles/bond_style.cpp @@ -87,8 +87,8 @@ LAMMPS *init_lammps(int argc, char **argv, const TestConfig &cfg, const bool new if (!info->has_style(prerequisite.first, style)) ++nfail; } + delete info; if (nfail > 0) { - delete info; cleanup_lammps(lmp, cfg); return nullptr; } diff --git a/unittest/force-styles/pair_style.cpp b/unittest/force-styles/pair_style.cpp index 81acd872b0..9354ad7f03 100644 --- a/unittest/force-styles/pair_style.cpp +++ b/unittest/force-styles/pair_style.cpp @@ -87,8 +87,8 @@ LAMMPS *init_lammps(int argc, char **argv, const TestConfig &cfg, const bool new if (!info->has_style(prerequisite.first, style)) ++nfail; } + delete info; if (nfail > 0) { - delete info; cleanup_lammps(lmp, cfg); return nullptr; }