From: Guus Sliepen Date: Sat, 11 Nov 2006 14:37:03 +0000 (+0000) Subject: popen() requires pclose(). X-Git-Tag: release-1.0.5~8 X-Git-Url: https://git.tinc-vpn.org/git/browse?a=commitdiff_plain;h=0d1ac68c59db87141616f69bcd3d79c705b1ecd0;p=tinc popen() requires pclose(). --- diff --git a/src/graph.c b/src/graph.c index b5af2241..eadb36a7 100644 --- a/src/graph.c +++ b/src/graph.c @@ -364,9 +364,10 @@ void dump_graph(void) fprintf(file, "}\n"); - fclose(file); - - if(filename[0] != '|') { + if(filename[0] == '|') { + pclose(file); + } else { + fclose(file); rename(tmpname, filename); free(tmpname); }