summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/graph.y
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs/src/graph.y')
-rw-r--r--libglusterfs/src/graph.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfs/src/graph.y b/libglusterfs/src/graph.y
index 92267c4c7..e2f16ff71 100644
--- a/libglusterfs/src/graph.y
+++ b/libglusterfs/src/graph.y
@@ -567,6 +567,12 @@ glusterfs_graph_construct (FILE *fp)
if (-1 == tmp_fd)
goto err;
+ ret = unlink (template);
+ if (ret < 0) {
+ gf_log ("parser", GF_LOG_WARNING, "Unable to delete file: %s",
+ template);
+ }
+
tmp_file = fdopen (tmp_fd, "w+b");
if (!tmp_file)
goto err;