From c659a0e3530010fd7d382c8d693688da5244c919 Mon Sep 17 00:00:00 2001 From: Ward Fisher Date: Tue, 20 Jan 2015 12:44:28 -0700 Subject: [PATCH] Coverity 1264403, Explicit null dereferenced. --- oc2/ocinternal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oc2/ocinternal.c b/oc2/ocinternal.c index 5d2118a07..0623e6a99 100644 --- a/oc2/ocinternal.c +++ b/oc2/ocinternal.c @@ -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);