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 E356BA04E6; Sat, 31 Oct 2020 14:19:05 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 78BFDCA90; Sat, 31 Oct 2020 14:19:03 +0100 (CET) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 9BCE9CA8F; Sat, 31 Oct 2020 14:19:01 +0100 (CET) Received: by mail-io1-f67.google.com with SMTP id u19so10408161ion.3; Sat, 31 Oct 2020 06:19:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=HDq8Bp+RAADIq3zt0ZLIDZfmnP2giyyBW8BlNk1sHdw=; b=Y0QmFlLXihf9ubCnw+rv3mZ0oCmQWMMYh8RkoTEvohwGobFzcpUsz5v0ayf1uwwkA5 ynQnC+oSHNuDkKWvMXlAfH4fKd1IjmLs5xm9O9dWOvXaViPSPMT4UA+XMPg/nZGmQPVC YfvZqbmbAZ9QchTp/Pefq42iTJU25XQpd5Hf3/tL6wBHA3GmUAHSfPVvdlh+mTJcvccC HHf4R2Wol7afLcQLjy9wJDB7D3pD/IlviGLqAZzmWCC9uYAg4iavzxaWVTlX+odhoj/u xfOhWmltQRpezkvfxvakdK21L1T8S+H7WjxRQCx3UM44f41WAKl56zE+uqWbE8Vr54IB y8Sw== 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=HDq8Bp+RAADIq3zt0ZLIDZfmnP2giyyBW8BlNk1sHdw=; b=jkL/7PExtPaQOAY05hx3g75tbnaQJW15Hc1BD5pvJW4pce6KrUgLRQ+3sbG6bC00TU IPFTEVLCLSswcFTEXi979IgHWyc6rK/1hyX1StaM5XxdniZE3p8L9N4aVUjYLfMx/F0L +7M78TZJHYnVKmX0d84O4s4j188sXg78ZHKzRamIu90XHtMCbpoDa0UcfnRk60YVwZiI eMY1XSUHnsc03goLhUmAJ0WIS43NKVFsWrzDnaZ+RU6+k15BBzpTkrvHVibXwxpT9ye5 9qGS1unsAH93kVjGLV82X6hn9Dhqscm4lFA4g7BIv7pvReoUkjAcg+fxsmjHlIr9D+NG aaBg== X-Gm-Message-State: AOAM5306pldgA1uBgcjJ3Bv5tsTuc1QfGhQgAZSRsfiEwseQiek1tKhr 7IBwOqowqmszq6DSXI7rjj0ZivVHj3/KnbKMcOM= X-Google-Smtp-Source: ABdhPJx7ofl25awyyMEIHgX84T/Hiz8NRv1iu6o/7tYNjJyeP2YudhnBS7fx3fC7EAwKXGNX9TO1bH4ybIr8l7RPNcE= X-Received: by 2002:a6b:fb07:: with SMTP id h7mr5029678iog.163.1604150339919; Sat, 31 Oct 2020 06:18:59 -0700 (PDT) MIME-Version: 1.0 References: <6d9af419c1c9eeac76f59b7484471e69c4fa43a6.1603172717.git.wangyunjian@huawei.com> In-Reply-To: <6d9af419c1c9eeac76f59b7484471e69c4fa43a6.1603172717.git.wangyunjian@huawei.com> From: Jerin Jacob Date: Sat, 31 Oct 2020 18:48:44 +0530 Message-ID: To: wangyunjian , Ferruh Yigit Cc: dpdk-dev , Jerin Jacob , Maciej Czekaj , "Lilijun (Jerry)" , xudingke , dpdk stable Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH] net/thunderx: fix memory leak when allocate rbdr desc ring fails 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 Tue, Oct 20, 2020 at 8:33 PM wangyunjian wrote: > > From: Yunjian Wang > > In nicvf_qset_rbdr_alloc(), we allocate memory for the 'rbdr' > structure but not released when allocate 'rbdr desc ring' fails. > > Fixes: 7413feee662d ("net/thunderx: add device start/stop and close") > Cc: stable@dpdk.org > > Signed-off-by: Yunjian Wang Acked-by: Jerin Jacob Applied to dpdk-next-net-mrvl/for-main. Thanks > --- > drivers/net/thunderx/nicvf_ethdev.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/net/thunderx/nicvf_ethdev.c b/drivers/net/thunderx/nicvf_ethdev.c > index f0bd20a22b..b6bb05e500 100644 > --- a/drivers/net/thunderx/nicvf_ethdev.c > +++ b/drivers/net/thunderx/nicvf_ethdev.c > @@ -638,6 +638,7 @@ nicvf_qset_rbdr_alloc(struct rte_eth_dev *dev, struct nicvf *nic, > NICVF_RBDR_BASE_ALIGN_BYTES, nic->node); > if (rz == NULL) { > PMD_INIT_LOG(ERR, "Failed to allocate mem for rbdr desc ring"); > + rte_free(rbdr); > return -ENOMEM; > } > > -- > 2.23.0 >