From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C4E26A046B for ; Fri, 28 Jun 2019 06:53:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7DBC21B951; Fri, 28 Jun 2019 06:53:18 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id D61E75B3E; Fri, 28 Jun 2019 06:53:11 +0200 (CEST) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 57FFCD6E; Thu, 27 Jun 2019 21:53:11 -0700 (PDT) Received: from qc2400f-1.austin.arm.com (qc2400f-1.austin.arm.com [10.118.12.65]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4E7F13F706; Thu, 27 Jun 2019 21:53:11 -0700 (PDT) From: Honnappa Nagarahalli To: yipeng1.wang@intel.com, sameh.gobriel@intel.com, bruce.richardson@intel.com, pablo.de.lara.guarch@intel.com, david.marchand@redhat.com, honnappa.nagarahalli@arm.com Cc: dharmik.thakkar@arm.com, dev@dpdk.org, nd@arm.com, stable@dpdk.org Date: Thu, 27 Jun 2019 23:52:54 -0500 Message-Id: <20190628045254.17614-3-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190628045254.17614-1-honnappa.nagarahalli@arm.com> References: <20190627032420.4730-1-honnappa.nagarahalli@arm.com> <20190628045254.17614-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v2 3/3] test/hash: free allocated memory X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Free allocated memory. Fixes: 3f9aab961ed3 ("test/hash: check lock-free extendable bucket") Cc: stable@dpdk.org Signed-off-by: Honnappa Nagarahalli Reviewed-by: Dharmik Thakkar --- app/test/test_hash_readwrite_lf.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf.c index 12522e265..9b054dec0 100644 --- a/app/test/test_hash_readwrite_lf.c +++ b/app/test/test_hash_readwrite_lf.c @@ -537,6 +537,7 @@ generate_keys(void) tbl_rwc_test_param.count_keys_ks_extbkt); rte_free(found); + rte_free(scanned_bkts); rte_hash_free(tbl_rwc_test_param.h); return 0; @@ -547,9 +548,11 @@ generate_keys(void) rte_free(keys_absent); rte_free(found); rte_free(tbl_rwc_test_param.keys_shift_path); + rte_free(keys_non_shift_path); rte_free(keys_ext_bkt); rte_free(keys_ks_extbkt); rte_free(scanned_bkts); + rte_hash_free(tbl_rwc_test_param.h); return -1; } @@ -653,6 +656,8 @@ test_rwc_reader(__attribute__((unused)) void *arg) cycles = rte_rdtsc_precise() - begin; rte_atomic64_add(&gread_cycles, cycles); rte_atomic64_add(&greads, read_cnt*loop_cnt); + + rte_free(pos); return 0; } @@ -1431,7 +1436,9 @@ test_hash_readwrite_lf_main(void) rte_free(tbl_rwc_test_param.keys_ks); rte_free(tbl_rwc_test_param.keys_absent); rte_free(tbl_rwc_test_param.keys_shift_path); - rte_free(scanned_bkts); + rte_free(tbl_rwc_test_param.keys_non_shift_path); + rte_free(tbl_rwc_test_param.keys_ext_bkt); + rte_free(tbl_rwc_test_param.keys_ks_extbkt); return 0; } -- 2.17.1