mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-27 07:30:33 +08:00
allocating storage for var hdf5 info
This commit is contained in:
parent
ce43b7d772
commit
d994a28139
@ -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. */
|
/* Create a new var and fill in some HDF5 cache setting values. */
|
||||||
if ((retval = nc4_var_list_add(grp, norm_name, ndims, &var)))
|
if ((retval = nc4_var_list_add(grp, norm_name, ndims, &var)))
|
||||||
BAIL(retval);
|
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;
|
var->is_new_var = NC_TRUE;
|
||||||
|
|
||||||
/* Point to the type, and increment its ref. count */
|
/* Point to the type, and increment its ref. count */
|
||||||
|
Loading…
Reference in New Issue
Block a user