summaryrefslogtreecommitdiffstats
path: root/hl/examples
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2021-02-04 13:17:49 (GMT)
committerGitHub <noreply@github.com>2021-02-04 13:17:49 (GMT)
commita06693be21d93a2b374b013dfc3e845b4e274a58 (patch)
tree10994bcfb3dc2465176ec2dd82b86c24595d7438 /hl/examples
parentc55ac8ab7126f101bf704a54824c0a55f410e105 (diff)
downloadhdf5-a06693be21d93a2b374b013dfc3e845b4e274a58.zip
hdf5-a06693be21d93a2b374b013dfc3e845b4e274a58.tar.gz
hdf5-a06693be21d93a2b374b013dfc3e845b4e274a58.tar.bz2
Fix DS examples (#307)
* fixed missed closing of a dataset * fixed missed closing of a dataset
Diffstat (limited to 'hl/examples')
-rw-r--r--hl/examples/ex_ds1.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/hl/examples/ex_ds1.c b/hl/examples/ex_ds1.c
index af8b581..09f398b 100644
--- a/hl/examples/ex_ds1.c
+++ b/hl/examples/ex_ds1.c
@@ -91,9 +91,11 @@ main(void)
if (H5DSattach_scale(did, dsid, DIM1) < 0)
goto out;
- /* close DS id */
+ /* close DS ids */
if (H5Dclose(dsid) < 0)
goto out;
+ if (H5Dclose(did) < 0)
+ goto out;
/* close file */
H5Fclose(fid);