From d994a28139ead46e508f3666350090218f277c0e Mon Sep 17 00:00:00 2001 From: Ed Hartnett Date: Tue, 13 Nov 2018 06:26:36 -0700 Subject: [PATCH] allocating storage for var hdf5 info --- libhdf5/hdf5var.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libhdf5/hdf5var.c b/libhdf5/hdf5var.c index c9de6e0be..6f7362772 100644 --- a/libhdf5/hdf5var.c +++ b/libhdf5/hdf5var.c @@ -390,6 +390,11 @@ NC4_def_var(int ncid, const char *name, nc_type xtype, /* Create a new var and fill in some HDF5 cache setting values. */ if ((retval = nc4_var_list_add(grp, norm_name, ndims, &var))) BAIL(retval); + + /* Add storage for HDF5-specific var info. */ + if (!(var->format_var_info = calloc(1, sizeof(NC_HDF5_VAR_INFO_T)))) + BAIL(NC_ENOMEM); + var->is_new_var = NC_TRUE; /* Point to the type, and increment its ref. count */