From 2b7a2d2c21e2329828c27e6f9556ea8d9d512021 Mon Sep 17 00:00:00 2001 From: Raghavendra G Date: Sat, 30 Aug 2014 16:33:59 +0530 Subject: USS: initialize a list before using it. Change-Id: Iba35e4397646a67384e878fbe7bdfb7586fc07f9 BUG: 1130888 Signed-off-by: Raghavendra G Reviewed-on: http://review.gluster.org/8569 Tested-by: Gluster Build System Reviewed-by: Vijay Bellur --- xlators/features/snapview-server/src/snapview-server.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/features/snapview-server') 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); -- cgit