From 09a7599ebcf88ea08d86b7e70dccd95844a3df76 Mon Sep 17 00:00:00 2001 From: wuzhouhui Date: Mon, 25 Feb 2019 09:32:51 +0800 Subject: [PATCH] ut/dif: fix iov memory over-allocation Change-Id: I8e285f0944388e8ab6b0f88fc1d962174318855a Signed-off-by: wuzhouhui Reviewed-on: https://review.gerrithub.io/c/446041 Reviewed-by: Shuhei Matsumoto Reviewed-by: Changpeng Liu Tested-by: SPDK CI Jenkins --- test/unit/lib/util/dif.c/dif_ut.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/lib/util/dif.c/dif_ut.c b/test/unit/lib/util/dif.c/dif_ut.c index 5d3f9671b4..8f598fb936 100644 --- a/test/unit/lib/util/dif.c/dif_ut.c +++ b/test/unit/lib/util/dif.c/dif_ut.c @@ -361,7 +361,7 @@ dif_disable_sec_512_md_8_single_iov_test(void) { struct iovec iov; - _iov_alloc_buf(&iov, (512 + 8) * 4); + _iov_alloc_buf(&iov, 512 + 8); dif_generate_and_verify(&iov, 1, 512 + 8, 8, 1, false, SPDK_DIF_DISABLE, 0, 0, 0, 0); @@ -373,7 +373,7 @@ dif_sec_512_md_8_prchk_0_single_iov_test(void) { struct iovec iov; - _iov_alloc_buf(&iov, (512 + 8) * 4); + _iov_alloc_buf(&iov, 512 + 8); dif_generate_and_verify(&iov, 1, 512 + 8, 8, 1, false, SPDK_DIF_TYPE1, 0, 0, 0, 0);