diff options
Diffstat (limited to 'fortran/src/H5Pf.c')
-rw-r--r-- | fortran/src/H5Pf.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fortran/src/H5Pf.c b/fortran/src/H5Pf.c index ea53620..49f8daf 100644 --- a/fortran/src/H5Pf.c +++ b/fortran/src/H5Pf.c @@ -1632,7 +1632,7 @@ nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, int c_idx; herr_t status; size_t c_namelen; - char* c_name; + char* c_name = NULL; off_t c_offset; hsize_t size; @@ -1641,6 +1641,7 @@ nh5pget_external_c(hid_t_f *prp_id, int_f *idx, size_t_f* name_size, _fcd name, * Allocate memory to store the name of the external file. */ if(c_namelen) c_name = (char*) HDmalloc(c_namelen + 1); + if (c_name == NULL) return ret_value; /* * Call H5Pget_external function. |