summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/H5Odtype.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/H5Odtype.c b/src/H5Odtype.c
index 569c635..420d70a 100644
--- a/src/H5Odtype.c
+++ b/src/H5Odtype.c
@@ -300,16 +300,16 @@ H5O_dtype_decode_helper(H5F_t *f, const uint8_t **pp, H5T_t *dt)
dt->u.vlen.type = (H5T_vlen_type_t)(flags & 0x0f);
/* Decode base type of VL information */
+ if (NULL==(dt->parent = H5MM_calloc(sizeof(H5T_t))))
+ HRETURN_ERROR (H5E_DATATYPE, H5E_NOSPACE, NULL, "memory allocation failed");
dt->parent->ent.header = HADDR_UNDEF;
- if (H5O_dtype_decode_helper(f, pp, dt->parent)<0) {
+ if (H5O_dtype_decode_helper(f, pp, dt->parent)<0)
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTDECODE, FAIL, "unable to decode VL parent type");
- }
dt->force_conv=TRUE;
/* Mark this type as on disk */
- if (H5T_vlen_mark(dt, f, H5T_VLEN_DISK)<0) {
+ if (H5T_vlen_mark(dt, f, H5T_VLEN_DISK)<0)
HRETURN_ERROR(H5E_DATATYPE, H5E_CANTINIT, FAIL, "invalid VL location");
- }
break;
default:
@@ -845,6 +845,10 @@ H5O_dtype_size(H5F_t *f, const void *mesg)
ret_value += dt->u.enumer.nmembs * dt->parent->size;
break;
+ case H5T_VLEN:
+ ret_value += H5O_dtype_size(f, dt->parent);
+ break;
+
default:
/*no properties */
break;