diff options
Diffstat (limited to 'tools/h5repack/h5repacktst.c')
-rw-r--r-- | tools/h5repack/h5repacktst.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/tools/h5repack/h5repacktst.c b/tools/h5repack/h5repacktst.c index 7ac339a..eaebbd6 100644 --- a/tools/h5repack/h5repacktst.c +++ b/tools/h5repack/h5repacktst.c @@ -4153,9 +4153,9 @@ int write_attr_in(hid_t loc_id, GREEN } e_t; - hid_t aid; - hid_t sid; - hid_t tid; + hid_t aid = -1; + hid_t sid = -1; + hid_t tid = -1; int val, i, j, k, n; float f; @@ -4237,6 +4237,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_BITFIELD @@ -4266,6 +4267,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_OPAQUE @@ -4292,6 +4294,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_COMPOUND @@ -4329,6 +4332,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_REFERENCE @@ -4377,6 +4381,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_VLEN @@ -4421,10 +4426,13 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Aclose(aid) < 0) goto out; + aid = -1; if (H5Tclose(tid) < 0) goto out; + tid = -1; if (H5Sclose(sid) < 0) goto out; + sid = -1; /*------------------------------------------------------------------------- * H5T_ARRAY @@ -4459,6 +4467,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_INTEGER and H5T_FLOAT @@ -4536,6 +4545,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_BITFIELD @@ -4568,6 +4578,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_OPAQUE @@ -4595,6 +4606,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_COMPOUND @@ -4630,6 +4642,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_REFERENCE @@ -4684,6 +4697,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_VLEN @@ -4733,10 +4747,13 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Aclose(aid) < 0) goto out; + aid = -1; if (H5Tclose(tid) < 0) goto out; + tid = -1; if (H5Sclose(sid) < 0) goto out; + sid = -1; /*------------------------------------------------------------------------- * H5T_ARRAY @@ -4779,6 +4796,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_INTEGER and H5T_FLOAT @@ -4898,6 +4916,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_BITFIELD @@ -4952,6 +4971,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_OPAQUE @@ -4965,6 +4985,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_COMPOUND @@ -5055,6 +5076,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_REFERENCE @@ -5139,6 +5161,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_VLEN @@ -5193,10 +5216,13 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Aclose(aid) < 0) goto out; + aid = -1; if (H5Tclose(tid) < 0) goto out; + tid = -1; if (H5Sclose(sid) < 0) goto out; + sid = -1; /*------------------------------------------------------------------------- * H5T_ARRAY @@ -5230,6 +5256,7 @@ int write_attr_in(hid_t loc_id, goto out; if (H5Tclose(tid) < 0) goto out; + tid = -1; /*------------------------------------------------------------------------- * H5T_INTEGER and H5T_FLOAT |