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 3327DA046B for ; Thu, 27 Jun 2019 10:07:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1543937B4; Thu, 27 Jun 2019 10:07:17 +0200 (CEST) Received: from mail-vs1-f68.google.com (mail-vs1-f68.google.com [209.85.217.68]) by dpdk.org (Postfix) with ESMTP id 78DC634F0 for ; Thu, 27 Jun 2019 10:07:13 +0200 (CEST) Received: by mail-vs1-f68.google.com with SMTP id m8so1056630vsj.0 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=HVsINl2+YjjEuqVhHsQqklYzqxB/AVT004x9aTj97glljujmNJck52vCtOhtrz0z1R vCQAlUkfKvgxSqT6Dw3LbDvUFwwqcsflPQOdtZHgBI6erBFrvi/6JxjTebZvy0sjSp7x qUWX++/e2Xx5g822YUdTlS+6MOUQP9hyDJVxCsAQAzCfj980N5c8KfQxAGpqE0DdtYtq vS97fjQPQWu/Sv0aqzcpGM8dTr34pF0NFBEYoAe6Qf/13dhGWKAHRtTmZf95FemH5vVi chjMd9sZFtaOKLkditFPfGs5YNax6WPbK5qp+Tez2zR3602IB4mIM3H/RHEHPHw5wniE b+Lg== X-Gm-Message-State: APjAAAXkAOJ45qDnKCC1ZrX21Xm4etoO3RrEZxqrrvFYTfYzchTlqrCK 9lwznnPmCfkPNsPNnxGrc2+P2AJQe7jcuv/N7dB2oQ== 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-stable] [PATCH 2/3] test/hash: free allocated memory X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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