summaryrefslogtreecommitdiffstats
path: root/src/H5Tconv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r--src/H5Tconv.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c
index 82c7084..698c99f 100644
--- a/src/H5Tconv.c
+++ b/src/H5Tconv.c
@@ -2685,10 +2685,6 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
nelmts-=safe;
} /* end while */
- /* Reset the conversion buffer pointer, so it doesn't get freed */
- if(write_to_file && noop_conv)
- conv_buf=NULL;
-
/* Release the temporary datatype IDs used */
if (tsrc_id >= 0)
H5I_dec_ref(tsrc_id);
@@ -2701,6 +2697,9 @@ H5T_conv_vlen(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
} /* end switch */
done:
+ /* If the conversion buffer doesn't need to be freed, reset its pointer */
+ if(write_to_file && noop_conv)
+ conv_buf=NULL;
/* Release the conversion buffer (always allocated, except on errors) */
if(conv_buf!=NULL)
H5FL_BLK_FREE(vlen_seq,conv_buf);