From patchwork Tue Jul 2 00:27:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 168251 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3543377ilk; Mon, 1 Jul 2019 17:27:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwUt9iHtzT1WOuFv7m140m8aBzhX4caEYyLFinkiOJmSNJSyJRVImAoZ6gHnJsKmA3dCYDL X-Received: by 2002:a1c:1f4c:: with SMTP id f73mr1030651wmf.151.1562027277735; Mon, 01 Jul 2019 17:27:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562027277; cv=none; d=google.com; s=arc-20160816; b=xm2XI/K/aii5ZEX2rBJkrzpuK8yPzbDX+clzfRAj0EkesqTDCYnZrEXrmz38fz9ZKH BCapZ0sYUjubQRMRwmMfSWOl7OrTaI/MELpefdY58XlZpWcN/APqaOJMXLdIAcq1SAmi zKUCmvFsvN9cR1iEJJ6wm6nTf3693BwfuyxuU9RKK6YWA5VqFtIE+SSrZFx+tv4h07m0 jgrLWHhscX8jGl2GvMliqe1XDQaPWbrVH6SgdE1Ulg/cfc7zL293ODBUag8RS3rh2yYr F38rzLE3jOsHgHnCSlkuQ9S5TazUMmLSuyJlYLI2M1Y22B5VdhnYestE7ULFNM0x2XZn Wzew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:references:in-reply-to :message-id:date:cc:to:from; bh=tP4b/6vNFL4kRx7SjXTuikIYwBTKn9s3p4mslY6TURY=; b=hYQIVkr4G2WZpyADCtI/AYIYVyb9NxhG7EXmicDO/jOXM/tfiOhdWjFuOmLT0ma9sM rRji7wXLSUhd22UeR8Y7jrjOrfzuqZgW2nh3yvR4tax/PYd9ZtGSB9xjth98gA5eSC/d CUeji9W3NbmfFL7pyWp2DoP/NFnvlREWA0caBqcGCgSLT5QOwm2eh4Gb/36Xstp6PbHp NpsHhFksay+h9XsEOzNAGGPmp89OZJRaeBXZi6jd5VRbfQSLJN01mSftrcAT3kFCrXkP h04/FLz8GJH9s3dY1/kcpUWs/r5rdJSiERJ+C4+rFf7sziVgttptCFudZuqnh18gl6EJ kaBQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id a11si572496wmh.97.2019.07.01.17.27.57; Mon, 01 Jul 2019 17:27:57 -0700 (PDT) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 47AF01B9B6; Tue, 2 Jul 2019 02:27:44 +0200 (CEST) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by dpdk.org (Postfix) with ESMTP id 23F501B9AB; Tue, 2 Jul 2019 02:27:42 +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 AD05AEBD; Mon, 1 Jul 2019 17:27:41 -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 9A4BB3F718; Mon, 1 Jul 2019 17:27:41 -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: Mon, 1 Jul 2019 19:27:23 -0500 Message-Id: <20190702002724.41400-3-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190702002724.41400-1-honnappa.nagarahalli@arm.com> References: <20190627032420.4730-1-honnappa.nagarahalli@arm.com> <20190702002724.41400-1-honnappa.nagarahalli@arm.com> Subject: [dpdk-dev] [PATCH v3 3/4] 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 --- v3 - removed freeing pos (addressed in 4/4) v2 - freed more memory app/test/test_hash_readwrite_lf.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/app/test/test_hash_readwrite_lf.c b/app/test/test_hash_readwrite_lf.c index 12522e265..792244fd0 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; } @@ -1431,7 +1434,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; }