diff options
author | Vijay Bellur <vbellur@redhat.com> | 2013-04-08 00:46:27 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2013-04-08 14:21:39 -0700 |
commit | e0fac0b68ff23a87da3eda4ced7a60b3e2fcf77a (patch) | |
tree | 6ccedd01ddb2262487c998027824af430ad2df96 /libglusterfs | |
parent | 6f6744730e34fa8a161b5f7f2a8ad3f8a7fc30fa (diff) |
glusterfsd: Cleanup temporary files from /tmp
For each gluster{d,fs,fsd} start, one or more temporary
file(s) created in /tmp were not being unlinked. This
patch cleans that up.
Modified a typo in an unrelated log message as well.
Change-Id: I3dec2a2ca40c7d6828eb238ec9cd08b6072cf0dd
BUG: 949327
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/4786
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'libglusterfs')
-rw-r--r-- | libglusterfs/src/graph.y | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfs/src/graph.y b/libglusterfs/src/graph.y index 92267c4c743..e2f16ff714b 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; |