diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/H5Pdcpl.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Pdcpl.c b/src/H5Pdcpl.c index 32793e6..54654c5 100644 --- a/src/H5Pdcpl.c +++ b/src/H5Pdcpl.c @@ -1563,8 +1563,8 @@ H5P_get_fill_value(H5P_genplist_t *plist, const H5T_t *type, void *value/*out*/, else { if(NULL == (buf = H5MM_malloc(H5T_get_size(fill.type)))) HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion") - if(H5T_path_bkg(tpath)) - bkg = value; + if(H5T_path_bkg(tpath) && NULL == (bkg = H5MM_malloc(H5T_get_size(fill.type)))) + HGOTO_ERROR(H5E_PLIST, H5E_CANTALLOC, FAIL, "memory allocation failed for type conversion") } /* end else */ HDmemcpy(buf, fill.buf, H5T_get_size(fill.type)); |