path: root/api
diff options
authorPoornima <>2013-11-14 01:29:30 +0000
committerAnand Avati <>2013-11-14 10:39:55 -0800
commit2990befa4cf9219f33b21b6c50d3e2afa4b7461b (patch)
tree9113dcfb0c016b124eb173959ddce793a5ef4f39 /api
parent4efbff29e773a8c59605f87bc3939c9c71b9da16 (diff)
gfapi: Closed the logfile fd in glfs_fini
The logfile fd is not closed even after calling glfs_fini, hence in smb mount if connection to glusterfs volume fails at a point after the log file was opened, the fd would remain open until the process dies. This patch closes the logfile fd in glfs_fini. Change-Id: I608bfac9c6833b42750b0383ad26fd33ee378ee1 BUG: 1030228 Signed-off-by: Poornima <> Reviewed-on: Tested-by: Gluster Build System <> Reviewed-by: Anand Avati <>
Diffstat (limited to 'api')
1 files changed, 3 insertions, 0 deletions
diff --git a/api/src/glfs.c b/api/src/glfs.c
index e94419c2d..29ed47c0c 100644
--- a/api/src/glfs.c
+++ b/api/src/glfs.c
@@ -666,5 +666,8 @@ glfs_fini (struct glfs *fs)
glfs_subvol_done (fs, subvol);
+ if (ctx->log.logfile)
+ fclose (ctx->log.logfile);
return ret;