diff options
author | schnetter <> | 2004-05-31 16:59:00 +0000 |
---|---|---|
committer | schnetter <> | 2004-05-31 16:59:00 +0000 |
commit | 65cee1492eb1b52f6d6bfa5423b3ee46b2998b40 (patch) | |
tree | ad336255a518dda3b86ac864421dd2cf1541dca9 /Carpet/CarpetIOHDF5/src/iohdf5.cc | |
parent | a08f7b9fcab3f2b331b20da393a1bce3439789ae (diff) |
Fix two small memory leaks.
darcs-hash:20040531165920-07bb3-ae62007c27f4e2dfbf025d0ee3d922a90ba53c16.gz
Diffstat (limited to 'Carpet/CarpetIOHDF5/src/iohdf5.cc')
-rw-r--r-- | Carpet/CarpetIOHDF5/src/iohdf5.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Carpet/CarpetIOHDF5/src/iohdf5.cc b/Carpet/CarpetIOHDF5/src/iohdf5.cc index f9de8183b..56d47035a 100644 --- a/Carpet/CarpetIOHDF5/src/iohdf5.cc +++ b/Carpet/CarpetIOHDF5/src/iohdf5.cc @@ -17,7 +17,7 @@ #include "cctk_Parameters.h" extern "C" { - static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOHDF5/src/iohdf5.cc,v 1.30 2004/05/21 18:11:34 schnetter Exp $"; + static const char* rcsid = "$Header: /home/eschnett/C/carpet/Carpet/Carpet/CarpetIOHDF5/src/iohdf5.cc,v 1.31 2004/05/31 18:59:20 schnetter Exp $"; CCTK_FILEVERSION(Carpet_CarpetIOHDF5_iohdf5_cc); } @@ -363,7 +363,7 @@ namespace CarpetIOHDF5 { if (cgdata.disttype == CCTK_DISTRIB_CONSTANT) { assert(grouptype == CCTK_ARRAY || grouptype == CCTK_SCALAR); - if(component!=0) continue; + if(component!=0) goto skip; h5data = CCTK_VarDataPtrI(cctkGH,tl,n); } else { for (comm_state<dim> state; !state.done(); state.step()) { @@ -544,10 +544,12 @@ namespace CarpetIOHDF5 { assert (!herr); } // if on root processor - - // Delete temporary copy - delete tmp; } // if ! CCTK_DISTRIB_BLAH + + skip: + // Delete temporary copy + delete tmp; + } END_COMPONENT_LOOP; } END_MAP_LOOP; |