summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd.c
diff options
context:
space:
mode:
authorAmar Tumballi <amarts@redhat.com>2012-04-13 17:29:41 +0530
committerAnand Avati <avati@redhat.com>2012-04-23 14:52:57 -0700
commit29f2de478cc6a475e6ae760d9cbe7ac847e9d79c (patch)
tree621fbb33e6e3de20f7c1b59a98e181c7b50b4796 /xlators/mgmt/glusterd/src/glusterd.c
parent4c9e8fad23836d87b0c4327e990c789630fe5b97 (diff)
core: coverity issues fixed
this is not a complete set of issues getting fixed. Will address other issues in another patch. Change-Id: Ib01c7b11b205078cc4d0b3f11610751e32d14b69 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 789278 Reviewed-on: http://review.gluster.com/3145 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c
index 7f41721c0..6acf3daff 100644
--- a/xlators/mgmt/glusterd/src/glusterd.c
+++ b/xlators/mgmt/glusterd/src/glusterd.c
@@ -650,9 +650,12 @@ check_prepare_mountbroker_root (char *mountbroker_root)
ret = 0;
out:
- close (dfd0);
- close (dfd);
- close (dfd2);
+ if (dfd0 != -1)
+ close (dfd0);
+ if (dfd != -1)
+ close (dfd);
+ if (dfd2 != -1)
+ close (dfd2);
return ret;
}