summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorRaghavendra Talur <rtalur@redhat.com>2014-02-04 15:57:05 +0530
committerVijay Bellur <vbellur@redhat.com>2014-02-07 03:01:35 -0800
commit432f7e45b2ddf511660d269548f248217a2b45ad (patch)
tree12c29a81fa8d5f46fbf254ab189c293b66cf7aa2 /xlators
parent055c02436fd6ef6984468b33158104770b41e422 (diff)
changelog: When connection is unsuccessful, close socket too.
Bug fix for Coverity CID: 1124791 Change-Id: I0362d45123ebc250290f3a5231f7fb113fa41212 BUG: 789278 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/6900 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators')
-rw-r--r--xlators/features/changelog/lib/src/gf-changelog.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/xlators/features/changelog/lib/src/gf-changelog.c b/xlators/features/changelog/lib/src/gf-changelog.c
index 1b014640e94..4b2b25ad573 100644
--- a/xlators/features/changelog/lib/src/gf-changelog.c
+++ b/xlators/features/changelog/lib/src/gf-changelog.c
@@ -202,6 +202,7 @@ gf_changelog_notification_init (xlator_t *this, gf_changelog_t *gfc)
gf_log (this->name, GF_LOG_ERROR,
"could not connect to changelog socket!"
" bailing out...");
+ close (sockfd);
ret = -1;
} else
gf_log (this->name, GF_LOG_INFO,