Sheep may read the cow data object from local, so we need to use valloc() here. Signed-off-by: MORITA Kazutaka <morita.kazutaka at lab.ntt.co.jp> --- sheep/store.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sheep/store.c b/sheep/store.c index 8daefd8..5d82e5a 100644 --- a/sheep/store.c +++ b/sheep/store.c @@ -711,7 +711,7 @@ int store_create_and_write_obj(const struct sd_req *req, struct sd_rsp *rsp, voi if (hdr->flags & SD_FLAG_CMD_COW) { dprintf("%" PRIu64 ", %" PRIx64 "\n", hdr->oid, hdr->cow_oid); - buf = zalloc(SD_DATA_OBJ_SIZE); + buf = valloc(SD_DATA_OBJ_SIZE); if (!buf) { eprintf("can not allocate memory\n"); goto out; -- 1.7.8.3 |