From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 97564A0350;
	Tue,  1 Mar 2022 18:08:17 +0100 (CET)
Received: from [217.70.189.124] (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 282E941163;
	Tue,  1 Mar 2022 18:08:17 +0100 (CET)
Received: from mail-pf1-f177.google.com (mail-pf1-f177.google.com
 [209.85.210.177])
 by mails.dpdk.org (Postfix) with ESMTP id D2B9840DF6
 for <dev@dpdk.org>; Tue,  1 Mar 2022 18:08:15 +0100 (CET)
Received: by mail-pf1-f177.google.com with SMTP id u16so14793233pfg.12
 for <dev@dpdk.org>; Tue, 01 Mar 2022 09:08:15 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=networkplumber-org.20210112.gappssmtp.com; s=20210112;
 h=date:from:to:cc:subject:message-id:in-reply-to:references
 :mime-version:content-transfer-encoding;
 bh=MvmoZdEAb6FeWP4EUEnfqSahHCHkNdnrPQltlBpOrdg=;
 b=hIfn246T2UomNZ4iLfP7rKfh1p5njSVBl/Yw64fDPx2LW+TzsmnsS6A7DsX1+JOFbR
 CLWfxJQT6Rj+8pFdUAOsqE01vyInDm+7fz+37YbgRcqT+HlVIPI6kmEzhPXzzL0PQsnZ
 IYaBqUP9WNuDl9M9hh8zPm+Y4LAzxVhAgshiTKB19HNRnhes5Vj4O8+T/uqvCTu2mKjQ
 hbrtZoXMZyk4IQrLgh1VRgrzLUIvpYGrD+Q9LEIAP68se7QqJwUop5nDeS+EP8VRPA8L
 R2+Re3Mj36ZZAAjzchDIyYc2P2Nxh9CwyF8O9W/QvIPmbo2VNmz/VimdRvA69RjKsd85
 kfcw==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to
 :references:mime-version:content-transfer-encoding;
 bh=MvmoZdEAb6FeWP4EUEnfqSahHCHkNdnrPQltlBpOrdg=;
 b=E5bazHUmWfjNP5JOe6MX6f/WeTi26t5+8cgFE6KZgI/W/ctt5LS4zdCyOijrAYD9Cv
 t9JiYXGiOryoe8YHJVSKyjq5emS0f8QqJlXbpZnqgTT+9w90C6+svGitrI4jv1vIrfEP
 hBkhCtJQBnS2EjlmID+n4HlWrOm27owyOQCYO3Ftb4d98i7YxncTuvSVhZX8bGl+WWjg
 6cyhjitbg8FQHcWdfMqOxKNWuGobVTJNKLX3cugXZYLAi4fVw5vPuekp36Fi36UloQs8
 CCXqMQjXSBFBTa8kvkeL/7SECZO4qx39hkqXUA0198VYEhHb1x4lQpMgAfdBovQe5/t4
 5EQw==
X-Gm-Message-State: AOAM532YIo2sdn5Kb0E8Mraj3UOxmpuiLKi0V510VemXGL9LpwaOSroH
 IddTqr+4Vm/KY2ZjIpqRAKCA7A==
X-Google-Smtp-Source: ABdhPJxUUNKWHamWpgPHmm+rEBnaI6H2r7ePSSeagSAfJL72SV1oKRo87F51XSX3fZeiijiF8WhUuA==
X-Received: by 2002:a65:604a:0:b0:375:5cc8:7458 with SMTP id
 a10-20020a65604a000000b003755cc87458mr22954477pgp.205.1646154494917; 
 Tue, 01 Mar 2022 09:08:14 -0800 (PST)
Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199])
 by smtp.gmail.com with ESMTPSA id
 s17-20020a056a0008d100b004cce703d042sm17610487pfu.32.2022.03.01.09.08.14
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Tue, 01 Mar 2022 09:08:14 -0800 (PST)
Date: Tue, 1 Mar 2022 09:08:12 -0800
From: Stephen Hemminger <stephen@networkplumber.org>
To: Weiguo Li <liwg06@foxmail.com>
Cc: cristian.dumitrescu@intel.com, jasvinder.singh@intel.com,
 wojciechx.liguzinski@intel.com, dev@dpdk.org
Subject: Re: [PATCH v3] sched: remove useless malloc in pie data init
Message-ID: <20220301090812.61bab2ea@hermes.local>
In-Reply-To: <tencent_B83A1FDF6523FB228731E13C45A738119708@qq.com>
References: <tencent_78746EBF8D471A44BC62F079644EE5221209@qq.com>
 <tencent_B83A1FDF6523FB228731E13C45A738119708@qq.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

On Tue,  1 Mar 2022 14:07:56 +0800
Weiguo Li <liwg06@foxmail.com> wrote:

> 'rte_pie_rt_data_init(NULL)' is not expected, and it's ought to
> fail when this happen. The malloc inside the function didn't work.
> So remove the malloc otherwise will lead to a memory leak.
> 
> Fixes: 44c730b0e37971 ("sched: add PIE based congestion management")
> 
> Signed-off-by: Weiguo Li <liwg06@foxmail.com>

Acked-by: Stephen Hemminger <stephen@networkplumber.org>