summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2014-08-30 16:33:59 +0530
committerVijay Bellur <vbellur@redhat.com>2014-09-18 10:54:30 -0700
commitebfb51fd77782f343215251f7641a2b31674f4a1 (patch)
treef7daf3a14938eb9cefa6e921d38b7ea8db476e0b
parent11485955083762d1c266dfae728a1abfd27aea63 (diff)
USS: initialize a list before using it.
backport of the patch http://review.gluster.org/8569 by Raghavendra G <rgowdapp@redhat.com> Change-Id: I7b25fdf27c6d7ff66d24925bc73d9c6681259d37 BUG: 1143961 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/8764 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
-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);