summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);