aboutsummaryrefslogtreecommitdiff
path: root/src/hdf5-file.c
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2010-06-02 14:56:40 +0200
committerThomas White <taw@physics.org>2010-06-02 14:56:40 +0200
commit891dc55c60e7270876ba8aea741e930273781e9f (patch)
treea87313ab9f55810df03fc82272c2faf5fa428944 /src/hdf5-file.c
parent316eb4b161b64fefcab34e64729c98f5b3235c19 (diff)
Close more stuff
Diffstat (limited to 'src/hdf5-file.c')
-rw-r--r--src/hdf5-file.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/hdf5-file.c b/src/hdf5-file.c
index c9b19b51..4272cbe6 100644
--- a/src/hdf5-file.c
+++ b/src/hdf5-file.c
@@ -113,6 +113,10 @@ static void cleanup(hid_t fh)
type = H5Iget_type(id);
if ( type == H5I_GROUP ) H5Gclose(id);
+ if ( type == H5I_DATASET ) H5Dclose(id);
+ if ( type == H5I_DATATYPE ) H5Tclose(id);
+ if ( type == H5I_DATASPACE ) H5Sclose(id);
+ if ( type == H5I_ATTR ) H5Aclose(id);
}
}
@@ -348,6 +352,7 @@ int hdf5_read(struct hdfile *f, struct image *image)
image->flags = flags;
}
}
+ H5Dclose(mask_dh);
/* Read wavelength from file */
image->lambda = get_wavelength(f);