mirror of
https://github.com/Unidata/netcdf-c.git
synced 2024-11-21 03:13:42 +08:00
Corrected issue 1372911 in Coverity.
This commit is contained in:
parent
485faa0333
commit
ad1220453a
@ -161,7 +161,6 @@ NC4_put_propattr(NC_HDF5_FILE_INFO_T* h5)
|
|||||||
char* text = NULL;
|
char* text = NULL;
|
||||||
ncstat = NC4_buildpropinfo(&h5->fileinfo->propattr,&text);
|
ncstat = NC4_buildpropinfo(&h5->fileinfo->propattr,&text);
|
||||||
if(text == NULL || ncstat != NC_NOERR) {
|
if(text == NULL || ncstat != NC_NOERR) {
|
||||||
if(text != NULL) free(text);
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
herr = -1;
|
herr = -1;
|
||||||
@ -175,6 +174,11 @@ NC4_put_propattr(NC_HDF5_FILE_INFO_T* h5)
|
|||||||
herr = 0;
|
herr = 0;
|
||||||
}
|
}
|
||||||
done:
|
done:
|
||||||
|
if(ncstat != NC_NOERR) {
|
||||||
|
if(text != NULL) {
|
||||||
|
free(text);
|
||||||
|
}
|
||||||
|
|
||||||
if(attid >= 0) HCHECK((H5Aclose(attid)));
|
if(attid >= 0) HCHECK((H5Aclose(attid)));
|
||||||
if(aspace >= 0) HCHECK((H5Sclose(aspace)));
|
if(aspace >= 0) HCHECK((H5Sclose(aspace)));
|
||||||
if(atype >= 0) HCHECK((H5Tclose(atype)));
|
if(atype >= 0) HCHECK((H5Tclose(atype)));
|
||||||
|
Loading…
Reference in New Issue
Block a user