X-Git-Url: https://tinc-vpn.org/git/browse?p=tinc;a=blobdiff_plain;f=src%2Fgraph.c;h=cca0935029587cc20d2cafa3fddb992b9c4a5b10;hp=586aee8b738e67a6627590188fbfe743304a4f24;hb=b47fbb8c5be20000f504e9e65d8ef0376ae92ff9;hpb=1d7b86cd9d1421f67d3717a52a52635155a29829 diff --git a/src/graph.c b/src/graph.c index 586aee8b..cca09350 100644 --- a/src/graph.c +++ b/src/graph.c @@ -318,7 +318,7 @@ void dump_graph(void) { node_t *n; edge_t *e; char *filename = NULL, *tmpname = NULL; - FILE *file, *pipe; + FILE *file, *pipe = NULL; if(!graph_changed || !get_config_string(lookup_config(config_tree, "GraphDumpFile"), &filename)) return; @@ -356,7 +356,7 @@ void dump_graph(void) { fprintf(file, "}\n"); - if(filename[0] == '|') { + if(pipe) { pclose(pipe); } else { fclose(file);