test/bdevio: fix missing free
Fix missing free of buffers used in tests. Signed-off-by: Jonas Pfefferle <pepperjo@japf.ch> Change-Id: I15a4e1edb8046447e6cd96104421f0e623d8ba09 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/14139 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@nvidia.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
0bd6b7f2cf
commit
55bc243fdb
@ -399,13 +399,7 @@ blockdev_read(struct io_target *target, char *rx_buf,
|
|||||||
static int
|
static int
|
||||||
blockdev_write_read_data_match(char *rx_buf, char *tx_buf, int data_length)
|
blockdev_write_read_data_match(char *rx_buf, char *tx_buf, int data_length)
|
||||||
{
|
{
|
||||||
int rc;
|
return memcmp(rx_buf, tx_buf, data_length);
|
||||||
rc = memcmp(rx_buf, tx_buf, data_length);
|
|
||||||
|
|
||||||
spdk_free(rx_buf);
|
|
||||||
spdk_free(tx_buf);
|
|
||||||
|
|
||||||
return rc;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -451,6 +445,9 @@ blockdev_write_read(uint32_t data_length, uint32_t iov_len, int pattern, uint64_
|
|||||||
* from each blockdev */
|
* from each blockdev */
|
||||||
CU_ASSERT_EQUAL(rc, 0);
|
CU_ASSERT_EQUAL(rc, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
spdk_free(rx_buf);
|
||||||
|
spdk_free(tx_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -483,6 +480,10 @@ blockdev_compare_and_write(uint32_t data_length, uint32_t iov_len, uint64_t offs
|
|||||||
/* Assert the write by comparing it with values read
|
/* Assert the write by comparing it with values read
|
||||||
* from each blockdev */
|
* from each blockdev */
|
||||||
CU_ASSERT_EQUAL(rc, 0);
|
CU_ASSERT_EQUAL(rc, 0);
|
||||||
|
|
||||||
|
spdk_free(rx_buf);
|
||||||
|
spdk_free(tx_buf);
|
||||||
|
spdk_free(write_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -861,6 +862,9 @@ blockdev_write_read_offset_plus_nbytes_equals_bdev_size(void)
|
|||||||
/* Assert the write by comparing it with values read
|
/* Assert the write by comparing it with values read
|
||||||
* from each blockdev */
|
* from each blockdev */
|
||||||
CU_ASSERT_EQUAL(rc, 0);
|
CU_ASSERT_EQUAL(rc, 0);
|
||||||
|
|
||||||
|
spdk_free(tx_buf);
|
||||||
|
spdk_free(rx_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@ -896,6 +900,9 @@ blockdev_write_read_offset_plus_nbytes_gt_bdev_size(void)
|
|||||||
|
|
||||||
blockdev_read(target, rx_buf, offset, data_length, 0);
|
blockdev_read(target, rx_buf, offset, data_length, 0);
|
||||||
CU_ASSERT_EQUAL(g_completion_success, false);
|
CU_ASSERT_EQUAL(g_completion_success, false);
|
||||||
|
|
||||||
|
spdk_free(tx_buf);
|
||||||
|
spdk_free(rx_buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
Loading…
Reference in New Issue
Block a user