[sheepdog] [PATCH stable-0.8 3/3] zookeeper: fix zk_event structure not initialized
Hitoshi Mitake
mitake.hitoshi at gmail.com
Tue Jul 29 03:22:41 CEST 2014
From: Ruoyu <liangry at ucweb.com>
If it is not initialized, some values of the members in the struct
will be incorrect in the output of zk_control lqueue command.
Signed-off-by: Ruoyu <liangry at ucweb.com>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
---
sheep/cluster/zookeeper.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sheep/cluster/zookeeper.c b/sheep/cluster/zookeeper.c
index 3908d01..96acce6 100644
--- a/sheep/cluster/zookeeper.c
+++ b/sheep/cluster/zookeeper.c
@@ -668,6 +668,7 @@ static int add_event(enum zk_event_type type, struct zk_node *znode, void *buf,
struct zk_event ev;
int rc;
+ memset(&ev, 0, sizeof(ev));
ev.id = get_uniq_id();
ev.type = type;
ev.sender = *znode;
--
1.9.1
More information about the sheepdog
mailing list