mirror of
https://github.com/Unidata/netcdf-c.git
synced 2025-01-18 15:55:12 +08:00
Coverity 1264403, Explicit null dereferenced.
This commit is contained in:
parent
30149d5e6e
commit
c659a0e353
@ -388,7 +388,7 @@ createtempfile(OCstate* state, OCtree* tree)
|
||||
#endif
|
||||
tree->data.filename = name; /* remember our tmp file name */
|
||||
name = NULL;
|
||||
tree->data.file = fopen(name,"w+");
|
||||
tree->data.file = fopen(tree->data.filename,"w+");
|
||||
if(tree->data.file == NULL) return OC_EOPEN;
|
||||
/* unlink the temp file so it will automatically be reclaimed */
|
||||
if(ocdebug == 0) unlink(tree->data.filename);
|
||||
|
Loading…
Reference in New Issue
Block a user