瀏覽代碼

src/core/disk_ops: make sure execution does not continue

Nathalie Furmento 8 年之前
父節點
當前提交
fa562b2c3b
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      src/core/disk_ops/disk_hdf5.c

+ 7 - 1
src/core/disk_ops/disk_hdf5.c

@@ -373,7 +373,10 @@ static void *starpu_hdf5_plug(void *parameter, starpu_ssize_t size STARPU_ATTRIB
 #ifndef H5_HAVE_THREADSAFE
         int nb_disk = STARPU_ATOMIC_ADD(&nb_disk_open, 1);
         if (nb_disk != 1)
-                _STARPU_ERROR("HDF5 library is not compiled with --enable-threadsafe. You can't open more than one HDF5 file in the same time !\n");
+	{
+                _STARPU_ERROR("HDF5 library is not compiled with --enable-threadsafe. You can't open more than one HDF5 file at the same time !\n");
+		return NULL;
+	}
 #endif
 
         struct starpu_hdf5_base * base;
@@ -392,6 +395,7 @@ static void *starpu_hdf5_plug(void *parameter, starpu_ssize_t size STARPU_ATTRIB
                 {
                         free(base);
                         _STARPU_ERROR("Can not create the HDF5 file (%s)", (char *) parameter);
+			return NULL;
                 }
 
                 /* just use _starpu_mktemp_many to create a file, close the file descriptor */
@@ -403,6 +407,7 @@ static void *starpu_hdf5_plug(void *parameter, starpu_ssize_t size STARPU_ATTRIB
                 {
                         free(base); 
                         _STARPU_ERROR("Can not create the HDF5 file (%s)", (char *) parameter);
+			return NULL;
                 }
                 base->created = 1;
         } 
@@ -418,6 +423,7 @@ static void *starpu_hdf5_plug(void *parameter, starpu_ssize_t size STARPU_ATTRIB
                 {
                         free(base); 
                         _STARPU_ERROR("Can not open the HDF5 file (%s)", (char *) parameter);
+			return NULL;
                 }
                 base->created = 0;
                 base->path = path;