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 ECD4FA046B for ; Fri, 28 Jun 2019 10:36:51 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E392F34F0; Fri, 28 Jun 2019 10:36:51 +0200 (CEST) Received: from mail-vs1-f66.google.com (mail-vs1-f66.google.com [209.85.217.66]) by dpdk.org (Postfix) with ESMTP id 4ADCE34F0 for ; Fri, 28 Jun 2019 10:36:50 +0200 (CEST) Received: by mail-vs1-f66.google.com with SMTP id q64so3536303vsd.1 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=g7Ut3yeIWWaD767LRYQOCQ2z/PI8MP4iMqcm9dRaEmueyuj5yxAZMQhbvkAD53nJqb YELQCYqnyUzBoY4v6YZL49eDS5N0b2DBSdoU2wSy2LgcXXLVGp/QLGe4No34/M0xp02D Fet30LmeAed8LR6bpkvA10e1sqgSjctocGSGMJ1lWbCX9elztp/bNapVMPLEu2kjEqEN rNGAs0UXvNij9MGZjA/7LepktVInT6jo3uBrEct2BHLZrkB84zdQ1pkQseNRA/0ZMtyo RMuD9fkfF06lPzMRgcOBQtNUy2992ob/usCQFrJbT3pR7X3R0VP2ffOQRQnKds57G/uh zHmQ== X-Gm-Message-State: APjAAAXg4XdV1WvZ7DvG4wxXQoQv+8LTc8NUIyARaHQZiTUIGfRtfEpB uKj6NLNGhOZlNYs/WUXnut+prAht3qqMojfyG+kfZw== 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-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 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