diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2012-11-05 18:21:11 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2012-11-05 18:21:11 (GMT) |
commit | 308171a2ef42bf4286845e151ccad5b6a96d46b6 (patch) | |
tree | 97ff0056a1b9c63a05f9efc94d79e18606c139a7 /src/H5Pocpl.c | |
parent | b9d042d2d273cacff8ecfeecd5e1bd75a6da7f3b (diff) | |
download | hdf5-308171a2ef42bf4286845e151ccad5b6a96d46b6.zip hdf5-308171a2ef42bf4286845e151ccad5b6a96d46b6.tar.gz hdf5-308171a2ef42bf4286845e151ccad5b6a96d46b6.tar.bz2 |
[svn-r23010] Description:
Initialize cd_values pointer when cd_elemts is zero.
Tested on:
Mac OSX/64 (amazon) w/debug
Windows (via Allen's builds)
Diffstat (limited to 'src/H5Pocpl.c')
-rw-r--r-- | src/H5Pocpl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5Pocpl.c b/src/H5Pocpl.c index 6e20963..d8ddfee 100644 --- a/src/H5Pocpl.c +++ b/src/H5Pocpl.c @@ -1514,9 +1514,12 @@ H5P__ocrt_pipeline_dec(const void **_pp, void *_value) UINT64DECODE_VAR(*pp, enc_value, enc_size); filter.cd_nelmts = (size_t)enc_value; - if(filter.cd_nelmts) + if(filter.cd_nelmts) { if(NULL == (filter.cd_values = (unsigned *)H5MM_malloc(sizeof(unsigned) * filter.cd_nelmts))) HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for cd_values") + } /* end if */ + else + filter.cd_values = NULL; /* decode values */ for(v = 0; v < filter.cd_nelmts; v++) |