This addresses the following Coverity warning:
Error: RESOURCE_LEAK (CWE-772): [#def15]
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:190: alloc_fn: Storage is returned from allocation function "openFile".
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:59:2: alloc_fn: Storage is returned from allocation function "fopen".
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:59:2: var_assign: Assigning: "fp" = "fopen(name, mode)".
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:69:2: return_alloc: Returning allocated memory "fp".
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:190: var_assign: Assigning: "outfile" = storage returned from "openFile(optarg, "w", CmdName)".
graphviz-2.40.1/cmd/edgepaint/edgepaintmain.c:190: overwrite_var: Overwriting "outfile" in "outfile = openFile(optarg, "w", CmdName)" leaks the storage that "outfile" points to.
# 188| break;
# 189| case 'o':
# 190|-> outfile = openFile(optarg, "w", CmdName);
# 191| break;
# 192| default:
Related to #1464.
Verbose = TRUE;
break;
case 'o':
+ if (outfile != NULL)
+ fclose(outfile);
outfile = openFile(optarg, "w", CmdName);
break;
default: