when executing dog cluster format,
by referring to the memory area that is not initialized
update_node_list() was an unintended behavior.

Signed-off-by: Masaki Saeki <[email protected]>
---
 dog/dog.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/dog/dog.c b/dog/dog.c
index 3f33cdd..54520dd 100644
--- a/dog/dog.c
+++ b/dog/dog.c
@@ -118,6 +118,7 @@ int update_node_list(int max_nodes)
        /* check whether cluster use diskmode */
        log_length = sizeof(struct epoch_log);
        logs = xmalloc(log_length);
+       memset(logs, 0, log_length);
 
        sd_init_req(&hdr, SD_OP_STAT_CLUSTER);
        hdr.data_length = log_length;
-- 
1.7.1


-- 
sheepdog mailing list
[email protected]
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to