mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-30 16:10:44 +08:00
fixed memory leak in nc_open when cmode includes both NC_MPIIO and NC_MPIPOSIX
This commit is contained in:
parent
9f708a052f
commit
a7d29db7b5
@ -1926,8 +1926,12 @@ NC_open(const char *path0, int cmode,
|
||||
cmode |= NC_64BIT_DATA;
|
||||
}
|
||||
|
||||
if((cmode & NC_MPIIO && cmode & NC_MPIPOSIX))
|
||||
return NC_EINVAL;
|
||||
/* Invalid to use both NC_MPIIO and NC_MPIPOSIX. Make up your damn
|
||||
* mind! */
|
||||
if((cmode & NC_MPIIO && cmode & NC_MPIPOSIX)) {
|
||||
nullfree(path);
|
||||
return NC_EINVAL;
|
||||
}
|
||||
|
||||
/* override any other table choice */
|
||||
if(dispatcher != NULL) goto havetable;
|
||||
|
Loading…
Reference in New Issue
Block a user