[sheepdog-users] [PATCH stable-0.8 11/22] sheep: initialize object cache info

Hitoshi Mitake mitake.hitoshi at lab.ntt.co.jp
Mon Feb 24 08:06:59 CET 2014


From: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>

This silences valgrind errors.

Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp>
Signed-off-by: Liu Yuan <namei.unix at gmail.com>
---
 sheep/object_cache.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/sheep/object_cache.c b/sheep/object_cache.c
index 09d3950..d51d459 100644
--- a/sheep/object_cache.c
+++ b/sheep/object_cache.c
@@ -1371,6 +1371,7 @@ int object_cache_get_info(struct object_cache_info *info)
 {
 	int j = 0;
 
+	memset(info, 0, sizeof(*info));
 	info->used = (uint64_t)gcache.capacity * 1024 * 1024;
 	info->size = (uint64_t)sys->object_cache_size * 1024 * 1024;
 
-- 
1.7.10.4




More information about the sheepdog-users mailing list