summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScot Breitenfeld <brtnfld@hdfgroup.org>2022-12-10 03:30:42 (GMT)
committerGitHub <noreply@github.com>2022-12-10 03:30:42 (GMT)
commit4a8be219e0afa932bbda3028f0c089b4145792d2 (patch)
treec348927c170db5fb4831be0bcf167e6011dba23c
parentef4f1f2bd41a5812cdb79b5a829d37bb56e37a4d (diff)
downloadhdf5-4a8be219e0afa932bbda3028f0c089b4145792d2.zip
hdf5-4a8be219e0afa932bbda3028f0c089b4145792d2.tar.gz
hdf5-4a8be219e0afa932bbda3028f0c089b4145792d2.tar.bz2
fixed unclosed objects in test (#2290)
-rw-r--r--fortran/test/tH5O.F9016
1 files changed, 10 insertions, 6 deletions
diff --git a/fortran/test/tH5O.F90 b/fortran/test/tH5O.F90
index 3b29e54..5fdb066 100644
--- a/fortran/test/tH5O.F90
+++ b/fortran/test/tH5O.F90
@@ -60,7 +60,7 @@ SUBROUTINE test_h5o_link(total_error)
INTEGER, INTENT(INOUT) :: total_error
INTEGER(HID_T) :: file_id
- INTEGER(HID_T) :: group_id
+ INTEGER(HID_T) :: group_id, group_id1, group_id2, group_id3
INTEGER(HID_T) :: space_id
INTEGER(HID_T) :: dset_id
INTEGER(HID_T) :: type_id
@@ -256,11 +256,11 @@ SUBROUTINE test_h5o_link(total_error)
!
! Create intermediate groups
!
- CALL h5gcreate_f(file_id,"/G1",group_id,error)
+ CALL h5gcreate_f(file_id,"/G1",group_id1,error)
CALL check("h5gcreate_f", error, total_error)
- CALL h5gcreate_f(file_id,"/G1/G2",group_id,error)
+ CALL h5gcreate_f(file_id,"/G1/G2",group_id2,error)
CALL check("h5gcreate_f", error, total_error)
- CALL h5gcreate_f(file_id,"/G1/G2/G3",group_id,error)
+ CALL h5gcreate_f(file_id,"/G1/G2/G3",group_id3,error)
CALL check("h5gcreate_f", error, total_error)
! Try putting a comment on the group /G1/G2/G3 by name
@@ -299,7 +299,7 @@ SUBROUTINE test_h5o_link(total_error)
!
! Create the dataset
!
- CALL h5dcreate_f(group_id, dataset, H5T_STD_I32LE, space_id, dset_id, error)
+ CALL h5dcreate_f(group_id3, dataset, H5T_STD_I32LE, space_id, dset_id, error)
CALL check("h5dcreate_f", error, total_error)
! Putting a comment on the dataset
@@ -477,7 +477,11 @@ SUBROUTINE test_h5o_link(total_error)
CALL check(" h5dclose_f", error, total_error)
CALL h5sclose_f(space_id, error)
CALL check("h5sclose_f", error, total_error)
- CALL h5gclose_f(group_id, error)
+ CALL h5gclose_f(group_id1, error)
+ CALL check("h5gclose_f", error, total_error)
+ CALL h5gclose_f(group_id2, error)
+ CALL check("h5gclose_f", error, total_error)
+ CALL h5gclose_f(group_id3, error)
CALL check("h5gclose_f", error, total_error)
! Test opening an object by index, note