From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.7 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 146CEC4321A for ; Fri, 28 Jun 2019 08:36:54 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 9C74C20644 for ; Fri, 28 Jun 2019 08:36:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C74C20644 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1C6214CC0; Fri, 28 Jun 2019 10:36:52 +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 510F54C6C for ; Fri, 28 Jun 2019 10:36:50 +0200 (CEST) Received: by mail-vs1-f68.google.com with SMTP id s141so480764vsc.3 for ; Fri, 28 Jun 2019 01:36:50 -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=ELUX18IZOzpadG4yK2aOFlnxmlcL/I5pGdrMucmTwSQ=; b=sEArgWpdIFWhlpK5Y341TuyYf8qvUJh8ZvfqRUu15REfmk/uiCoMaO++JAxX3+GXse 5tnPUsgoIbwfHLmxd26379N85spWS58ltIiuWB1vBh/o7yVTTaacmX8q34AySOUk3WpF F+Jm3yX81SqQzn3N71gXfsaDo4ToXjJwzpA4EkpTXE/KYMJyQOIpWtoBcQCS7vCLFT5c qvuK7y0RPneKrY4aEbIfkUYsau1hvpg+0YG0jqOelOw7BGG+4bFBzdFw6kWsB1ANk0Cq MtwnAvuhPue2MedlnW+vc5s7ilaV0H9RU2hJJVq2wA3YKdNkXNLvsVKvqkjeeFBN8MXF bimg== X-Gm-Message-State: APjAAAWIef4GwMtk4A0smlo0vDzWVLqy99U2b/XnAY8H/bCxOAhwM/Dv LME4A1CyeuzW08VzBtN8rTGr/qQUalQKxnixe8vmLw== X-Google-Smtp-Source: APXvYqwRp3WiglZ5uDrbK+588fIcCyN6BE5UJHPLgAbEiQNc6rApIqgZwrKASQXK470cFrVgjvhPLi0c0y1jKWEv4jg= X-Received: by 2002:a67:f998:: with SMTP id b24mr5561268vsq.180.1561711009672; Fri, 28 Jun 2019 01:36:49 -0700 (PDT) MIME-Version: 1.0 References: <20190627032420.4730-1-honnappa.nagarahalli@arm.com> <20190627032420.4730-2-honnappa.nagarahalli@arm.com> In-Reply-To: From: David Marchand Date: Fri, 28 Jun 2019 10:36:38 +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 Fri, Jun 28, 2019 at 6:59 AM Honnappa Nagarahalli < Honnappa.Nagarahalli@arm.com> wrote: > > 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 honnappa.nagarahalli@arm.com>> > Reviewed-by: Dharmik Thakkar dharmik.thakkar@arm.com>> > --- > 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 > [Honnappa] Thanks for the review. I fixed these and few more in V2. > Still missed pos in some err path. Comment incoming. > 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). > [Honnappa] This can be considered as initialization code. I have left this > as it is. > Ok, I won't insist. -- David Marchand