diff options
author | ggarg <ggarg@redhat.com> | 2014-06-17 16:25:03 +0530 |
---|---|---|
committer | Kaushal M <kaushal@redhat.com> | 2014-08-13 02:51:18 -0700 |
commit | c03e07b4147bb2fe902be77f0bbef9c9bae977ab (patch) | |
tree | adaff7a240ba26a71fa457ff4320750f9d996141 | |
parent | fd6765b4a3f8162bf36054cf3de6e88a6bdfadd3 (diff) |
glusterd: Coverity fix for going out of scope leaks of directory pointer
In function volgen_apply_filters() directory stream associated with
"filterdir" should be close after opening directory stream corresponding
to directory name. closedir() also closes the underlying file descriptor
associated with "filterdir".
Coverity CID: 1124723
Change-Id: I78ed04047ded98bf95d201afed01c727aa506882
BUG: 789278
Reviewed-on: http://review.gluster.org/8088
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Kaushal M <kaushal@redhat.com>
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-volgen.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index f1e30e1ee82..7981e2977e8 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1010,6 +1010,8 @@ volgen_apply_filters (char *orig_volfile) free_fp: GF_FREE(filterpath); } + + closedir (filterdir); } static int |