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 E17C7A046B for ; Thu, 27 Jun 2019 10:07:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B452434F0; Thu, 27 Jun 2019 10:07:14 +0200 (CEST) Received: from mail-vs1-f67.google.com (mail-vs1-f67.google.com [209.85.217.67]) by dpdk.org (Postfix) with ESMTP id 7082E25D9 for ; Thu, 27 Jun 2019 10:07:13 +0200 (CEST) Received: by mail-vs1-f67.google.com with SMTP id l125so1008787vsl.13 for ; Thu, 27 Jun 2019 01:07:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BQHV1pQW/2PK5kPIY8sr3Xe96gaiykD5NHVINIjX01I=; b=EwXQ5NvzoHfx2hulOERpav6mGtRsOtXMZoqK2fbriAIZur2KM7MGhdtubAPWW3Gjb+ JA04xlxHtYvlpbyDnzSIUVZQnOiDDNFm6Oeea6kdzgJmZxVwvOqjgcYT9AgEU8iWhW/f VU6PgM1VxnEAnWbJZqlSXxOffvizPAWDY+EkIDbZydexLUwOe4XArWscR/fra5Lcb50a ehzMGLwpTgqGiLuQulmSZcAkfY3YQMnsoJMSRhpdZOvFrCperbZS+kOpNiWfkt8KB3g9 ZeGP2Bgi4KP2GjpOou0ol5mbDWIXcxNMIbeMYzoYKH7q4XG0l/pDpnE5sRvRFh0A2DX9 eYOg== X-Gm-Message-State: APjAAAXyLfe7KrLelCVRZXyOnKE/W9ayOfOvnnjnVqku6mItgqi7o3uu dp7E4/wkAAZKeN391RnhJEWQWU4Ol8z1KCeskeCw7A== X-Google-Smtp-Source: APXvYqwV2AuofD2YA1RNvJB+82mbivXQkAAuOsJyOQvCkeeJcUIemCaLGmNwydMbaC6wsNWg+ZOLWzJkdraAHBv+uH8= X-Received: by 2002:a67:f998:: with SMTP id b24mr1781438vsq.180.1561622832814; Thu, 27 Jun 2019 01:07:12 -0700 (PDT) MIME-Version: 1.0 References: <20190627032420.4730-1-honnappa.nagarahalli@arm.com> <20190627032420.4730-2-honnappa.nagarahalli@arm.com> In-Reply-To: <20190627032420.4730-2-honnappa.nagarahalli@arm.com> From: David Marchand Date: Thu, 27 Jun 2019 10:07:01 +0200 Message-ID: To: Honnappa Nagarahalli Cc: "Wang, Yipeng1" , "Gobriel, Sameh" , Bruce Richardson , Pablo de Lara , Dharmik Thakkar , dev , nd , dpdk stable Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [dpdk-stable] [PATCH 2/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" On Thu, Jun 27, 2019 at 5:25 AM Honnappa Nagarahalli < honnappa.nagarahalli@arm.com> wrote: > 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 | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/app/test/test_hash_readwrite_lf.c > b/app/test/test_hash_readwrite_lf.c > index e9aca6ff4..e92d1065b 100644 > --- a/app/test/test_hash_readwrite_lf.c > +++ b/app/test/test_hash_readwrite_lf.c > @@ -1431,6 +1431,8 @@ 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(tbl_rwc_test_param.keys_ext_bkt); > + rte_free(tbl_rwc_test_param.keys_ks_extbkt); > rte_free(scanned_bkts); > return 0; > } > -- > 2.17.1 > I inspected this test a little more, I can see other leaks. - generate_keys(), on error, we are leaking tbl_rwc_test_param.h. - test_rwc_reader(), we are leaking pos. - test_hash_readwrite_lf_main(), we are leaking tbl_rwc_test_param.keys_non_shift_path Looking at your patch 1, I would prefer you reset tbl_rwc_test_param field per field to NULL once the rte_free() is called. It would then be easier for you to track the remaining leaks (and patch 1 disappears). -- David Marchand