[PATCH] bs_sheepdog.c: add missing initialization of request header

Ryusuke Konishi <[email protected]>
Newsgroups org.kernel.vger.stgt
Message-ID <[email protected]>
The create_branch function of the sheepdog driver sends a partially
uninitialized request to sheepdog.  This fixes the defect.

Signed-off-by: Ryusuke Konishi <[email protected]>
Cc: Hitoshi Mitake <[email protected]>
---
 usr/bs_sheepdog.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/usr/bs_sheepdog.c b/usr/bs_sheepdog.c
index f11b693..59b2d25 100644
--- a/usr/bs_sheepdog.c
+++ b/usr/bs_sheepdog.c
@@ -1116,6 +1116,7 @@ static int create_branch(struct sheepdog_access_info *ai)
 	unsigned int wlen = 0, rlen;
 	int ret;
 
+	memset(&hdr, 0, sizeof(hdr));
 	hdr.opcode = SD_OP_DEL_VDI;
 	hdr.vdi_id = ai->inode.vdi_id;
 	hdr.flags = SD_FLAG_CMD_WRITE;
-- 
1.7.9.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.