summaryrefslogtreecommitdiffstats
path: root/xlators/features
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2014-08-30 16:33:59 +0530
committerVijay Bellur <vbellur@redhat.com>2014-09-02 11:14:42 -0700
commit2b7a2d2c21e2329828c27e6f9556ea8d9d512021 (patch)
tree892adf9d272e3a17b68ad500107a9178231754cc /xlators/features
parent6c4325ca57bca72d10e5172f8423262cdb3a379c (diff)
USS: initialize a list before using it.
Change-Id: Iba35e4397646a67384e878fbe7bdfb7586fc07f9 BUG: 1130888 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/8569 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/features')
-rw-r--r--xlators/features/snapview-server/src/snapview-server.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c
index 4b6827c0d0a..b90ad24d7d0 100644
--- a/xlators/features/snapview-server/src/snapview-server.c
+++ b/xlators/features/snapview-server/src/snapview-server.c
@@ -2386,7 +2386,7 @@ svs_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
off_t off, dict_t *xdata)
{
svs_private_t *priv = NULL;
- gf_dirent_t entries;
+ gf_dirent_t entries = {{{0, }, }, };
int count = 0;
svs_inode_t *inode_ctx = NULL;
int op_errno = EINVAL;
@@ -2394,6 +2394,8 @@ svs_readdir (call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
svs_fd_t *svs_fd = NULL;
glfs_fd_t *glfd = NULL;
+ INIT_LIST_HEAD (&entries.list);
+
GF_VALIDATE_OR_GOTO ("snap-view-server", this, unwind);
GF_VALIDATE_OR_GOTO (this->name, frame, unwind);
GF_VALIDATE_OR_GOTO (this->name, fd, unwind);