summaryrefslogtreecommitdiffstats
path: root/tools/misc/talign.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/misc/talign.c')
-rw-r--r--tools/misc/talign.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/misc/talign.c b/tools/misc/talign.c
index 2d0a9d1..7eb4c50 100644
--- a/tools/misc/talign.c
+++ b/tools/misc/talign.c
@@ -37,11 +37,11 @@ const char *setname = "align";
int main(void)
{
- hid_t fil,spc,set;
- hid_t cs6, cmp, fix;
- hid_t cmp1, cmp2, cmp3;
- hid_t plist;
- hid_t array_dt;
+ hid_t fil=-1, spc=-1, set=-1;
+ hid_t cs6=-1, cmp=-1, fix=-1;
+ hid_t cmp1=-1, cmp2=-1, cmp3=-1;
+ hid_t plist=-1;
+ hid_t array_dt=-1;
hsize_t dim[2];
hsize_t cdim[4];
@@ -137,6 +137,7 @@ int main(void)
H5Dread(set, fix, spc, H5S_ALL, H5P_DEFAULT, data);
fptr = (float *)(data + H5Tget_member_offset(fix, 1));
+ H5Dclose(set);
out:
if(error < 0) {
@@ -194,7 +195,9 @@ out:
if(data)
HDfree(data);
H5Sclose(spc);
+ H5Tclose(cs6);
H5Tclose(cmp);
+ H5Tclose(fix);
H5Tclose(cmp1);
H5Tclose(cmp2);
H5Tclose(cmp3);