From 0d1ac68c59db87141616f69bcd3d79c705b1ecd0 Mon Sep 17 00:00:00 2001 From: Guus Sliepen Date: Sat, 11 Nov 2006 14:37:03 +0000 Subject: [PATCH] popen() requires pclose(). --- src/graph.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } -- 2.39.5