Coverity 1264403, Explicit null dereferenced.

This commit is contained in:
Ward Fisher 2015-01-20 12:44:28 -07:00
parent 30149d5e6e
commit c659a0e353

View File

@ -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);