From c8e034b09267abd72a568abb634682e6d5f52be9 Mon Sep 17 00:00:00 2001 From: paul luse Date: Wed, 21 Aug 2019 12:56:46 -0400 Subject: [PATCH] ut/compress: fix compress UT Remove code that was freeing memory in the code under test. It was no longer needed following a refactor of the init code and was causing a double free. Change-Id: I99018587ac12e01d4fe950e0718c23790ce7ce41 Signed-off-by: paul luse Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465966 Tested-by: SPDK CI Jenkins Reviewed-by: Jim Harris Reviewed-by: Shuhei Matsumoto Reviewed-by: Ben Walker --- test/unit/lib/bdev/compress.c/compress_ut.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/test/unit/lib/bdev/compress.c/compress_ut.c b/test/unit/lib/bdev/compress.c/compress_ut.c index 5fbb92001..ee2e22c2b 100644 --- a/test/unit/lib/bdev/compress.c/compress_ut.c +++ b/test/unit/lib/bdev/compress.c/compress_ut.c @@ -736,8 +736,6 @@ test_initdrivers(void) { int rc; static struct rte_mempool *orig_mbuf_mp; - struct comp_device_qp *dev_qp; - struct comp_device_qp *tmp_qp; orig_mbuf_mp = g_mbuf_mp; g_mbuf_mp = NULL; @@ -820,12 +818,6 @@ test_initdrivers(void) rc = vbdev_init_compress_drivers(); CU_ASSERT(rc == 0); - TAILQ_FOREACH_SAFE(dev_qp, &g_comp_device_qp, link, tmp_qp) { - TAILQ_REMOVE(&g_comp_device_qp, dev_qp, link); - free(dev_qp->device); - free(dev_qp); - } - g_mbuf_mp = orig_mbuf_mp; }