summaryrefslogtreecommitdiffstats
path: root/src/H5Ocopy_ref.c
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2020-01-07 21:51:29 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2020-01-10 01:05:31 (GMT)
commit9c398c804be54b3999794459df0a6648b3f0e9b1 (patch)
treefbfc6e0ae2f40133533ffd15e919e88e6e5d737b /src/H5Ocopy_ref.c
parentc3ae64a8753e6449a8c5c5e58325f0cb7e7990b6 (diff)
downloadhdf5-9c398c804be54b3999794459df0a6648b3f0e9b1.zip
hdf5-9c398c804be54b3999794459df0a6648b3f0e9b1.tar.gz
hdf5-9c398c804be54b3999794459df0a6648b3f0e9b1.tar.bz2
H5R: set app ref when incrementing ref_count on location held by reference
(fix HDFFV-10992)
Diffstat (limited to 'src/H5Ocopy_ref.c')
-rw-r--r--src/H5Ocopy_ref.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Ocopy_ref.c b/src/H5Ocopy_ref.c
index b835f8e..f53eb4a 100644
--- a/src/H5Ocopy_ref.c
+++ b/src/H5Ocopy_ref.c
@@ -383,7 +383,8 @@ H5O__copy_expand_ref_object2(H5O_loc_t *src_oloc, hid_t tid_src, H5T_t *dt_src,
H5F_addr_encode(dst_oloc->file, &p, dst_oloc->addr);
if(H5R__set_obj_token(ref, (const H5VL_token_t *)&tmp_token, token_size) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set object token")
- if(H5R__set_loc_id(ref, dst_loc_id, TRUE) < 0)
+ /* Do not set app_ref since references are released once the copy is done */
+ if(H5R__set_loc_id(ref, dst_loc_id, TRUE, FALSE) < 0)
HGOTO_ERROR(H5E_OHDR, H5E_CANTSET, FAIL, "unable to set destination loc id")
} /* end for */