From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id EAAFDA00C2 for ; Fri, 6 Jan 2023 09:53:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E5E974067C; Fri, 6 Jan 2023 09:53:38 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id 9AFD14021F for ; Fri, 6 Jan 2023 09:53:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672995217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fY63hhywSLl6E804Ci1wMb5biEtAJ7zTmJoEy/KrDIE=; b=Ul6drGA4R0Eorc5Td+Zg72zcPxCxgUjfGPJfwL6SpY8IWFLZlxz+U25aPrh0/YZWFDb+nJ SKW+imXo/QUA+7CZe5MsFOnve4h++ZcwRSuNpUxOtjJN9yez2r3Gx/3eLUQ1zHKKns6c4w 0zzlTZNWcLNQKfU1SxZsdjeOQ27xnJc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-22-cPti5jECPwqrMKCOml9czw-1; Fri, 06 Jan 2023 03:53:32 -0500 X-MC-Unique: cPti5jECPwqrMKCOml9czw-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 4B647802C1C; Fri, 6 Jan 2023 08:53:32 +0000 (UTC) Received: from [10.39.208.15] (unknown [10.39.208.15]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C503340C2064; Fri, 6 Jan 2023 08:53:30 +0000 (UTC) Message-ID: <2c7808ba-0bb5-2ccf-724a-e6dd2f080c61@redhat.com> Date: Fri, 6 Jan 2023 09:53:29 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.6.0 Subject: Re: [PATCH v2 1/7] baseband/acc: acc100 free harq layout pointer To: Hernan Vargas , dev@dpdk.org, gakhil@marvell.com, trix@redhat.com Cc: nicolas.chautru@intel.com, qi.z.zhang@intel.com, stable@dpdk.org References: <20230106054443.199473-1-hernan.vargas@intel.com> <20230106054443.199473-2-hernan.vargas@intel.com> From: Maxime Coquelin In-Reply-To: <20230106054443.199473-2-hernan.vargas@intel.com> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 On 1/6/23 06:44, Hernan Vargas wrote: > Explicitly call rte_free for harq_layout pointer in dev_close function > to prevent memory leak. > > Fixes: ba2262fe16c ("baseband/acc100: fix close cleanup") > Cc: stable@dpdk.org > > Signed-off-by: Hernan Vargas > --- > drivers/baseband/acc/rte_acc100_pmd.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/baseband/acc/rte_acc100_pmd.c b/drivers/baseband/acc/rte_acc100_pmd.c > index ba8247d47e..0177a9e0ea 100644 > --- a/drivers/baseband/acc/rte_acc100_pmd.c > +++ b/drivers/baseband/acc/rte_acc100_pmd.c > @@ -622,6 +622,7 @@ acc100_dev_close(struct rte_bbdev *dev) > rte_free(d->tail_ptrs); > rte_free(d->info_ring); > rte_free(d->sw_rings_base); > + rte_free(d->harq_layout); > d->sw_rings_base = NULL; > d->tail_ptrs = NULL; > d->info_ring = NULL; Please set d->harq_layout to NULL for consistency and to prevent double free. Maxime