summaryrefslogtreecommitdiffstats
path: root/src/H5FD.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2006-07-27 15:01:48 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2006-07-27 15:01:48 (GMT)
commitb7dd856aeade866db86e40f0fb781a014c7a4366 (patch)
tree4c546a246acb3c1fb450f07f8f602317dc90d85c /src/H5FD.c
parent4749d8e0e95e4a59a72e1eaacb6c264a2981fd80 (diff)
downloadhdf5-b7dd856aeade866db86e40f0fb781a014c7a4366.zip
hdf5-b7dd856aeade866db86e40f0fb781a014c7a4366.tar.gz
hdf5-b7dd856aeade866db86e40f0fb781a014c7a4366.tar.bz2
[svn-r12504]
bug fix calling h5tools_get_fapl running the mpio driver caused H5FD_pl_copy to fail silently in some conditions. a MPI call was made before MPI_Init. solution: corrected the MPI call to be made after MPI_Init and added error return conditions to H5FD_pl_copy and h5tools_get_fapl tested on copper parallel, mir, shanti
Diffstat (limited to 'src/H5FD.c')
-rw-r--r--src/H5FD.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/H5FD.c b/src/H5FD.c
index d5c5187..8ce3125 100644
--- a/src/H5FD.c
+++ b/src/H5FD.c
@@ -553,6 +553,8 @@ done:
* Thursday, October 23, 2003
*
* Modifications:
+ * Pedro Vicente Nunes, Wednesday, July 26, 2006
+ * added a HGOTO_ERROR call in the case the copy function returns NULL
*
*-------------------------------------------------------------------------
*/
@@ -569,6 +571,8 @@ H5FD_pl_copy(void *(*copy_func)(const void *), size_t pl_size, const void *old_p
/* Allow the driver to copy or do it ourselves */
if (copy_func) {
new_pl = (copy_func)(old_pl);
+ if(new_pl==NULL)
+ HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, FAIL, "property list copy failed")
} else if (pl_size>0) {
if((new_pl = H5MM_malloc(pl_size))==NULL)
HGOTO_ERROR(H5E_VFL, H5E_NOSPACE, FAIL, "property list allocation failed")