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 0E27C454E5; Mon, 24 Jun 2024 21:10:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DD7A1402E6; Mon, 24 Jun 2024 21:10:39 +0200 (CEST) Received: from mail-oa1-f49.google.com (mail-oa1-f49.google.com [209.85.160.49]) by mails.dpdk.org (Postfix) with ESMTP id A824D402DD for ; Mon, 24 Jun 2024 21:10:38 +0200 (CEST) Received: by mail-oa1-f49.google.com with SMTP id 586e51a60fabf-25957dfd971so2437893fac.0 for ; Mon, 24 Jun 2024 12:10:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719256238; x=1719861038; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=lsxC3oOmxtVEjiBjnVnPsfWdqGAM7y7dwgf+oO5egU4=; b=GmzJ6nodiWy2fFYBnC4bpOJUngqQ6jlB+lfzhFcNNqrgu4a4p+Tn63UMRZe6aiAjJd cEpNAsAqEcJ3IE1F82EGdWycJscxF0hT5R2rW40wFqDft+NSV0PIXN8sULCgPGZTWpce fNbsu3yDtmjhUoiF867z9JTvnIjM5KDkxTR13pRLMgrI8ZHaVNQq5+lIriZsD0QQcUxD 1+7arCN43Mn4tlCKH5bVJuhPYCB22ZkpLNeKcTKuw1c6ZhkNy1psVrE9MuEMC3f5MTSo dZ8AKtUFHYUJt6fgBIaDiBjgj4dhYx27WS8yeBKoRLJUE2ss63xl81OQmP13m7sRrZ7l q/Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719256238; x=1719861038; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=lsxC3oOmxtVEjiBjnVnPsfWdqGAM7y7dwgf+oO5egU4=; b=i6Vb76mENWLN8rrN+avoZxOySvsEYmG4kvxXpjBipidNKk6ZOHxGsGOyddh3yFnGRA /6GtNmSjX/AvgXBVPZjgWt6iHmb5g2+8rSp6K9fkmusd0PvqaZg4EjU5i3h5dlN2xGoK WkoSsahre4JyUu1ahEBt1iEqHj3MwtbQ3FUrYPu0I6aEmucnCR8bdjBBBfDi6w23SmvU lLZwC0cCbDlPUpbgOiwDY1NTzwtpvbCs6FPy0oKuV2sdGGErHngZ12+W5ByeD9S5AB1m omOAb/Ush4KVhGw4IxVOa/jNgGLYeyILCmBRhnT9SMZ+6BLT17mBPvoC+AbwDH4HhjvK f6DQ== X-Forwarded-Encrypted: i=1; AJvYcCWZwJX01/zYe7OO9FLt512mxg+MLdQnrdNW+Ok2UGFKjAubf3KrK4NrJdSsvbBX4W1Z1a9gfUnZCHKlfPg= X-Gm-Message-State: AOJu0YzhAPqdPjP8tFqjcmm6GWPmmd3BjDfuBpoEKPMnWrsFxufnalU0 wC0QWygRTx/zQVuv69o/hJEj7VSBNHd3tNrgfrI6zEzD31YntfUC01NHi6/5+WZepAPn2cRYjb5 u2SHKL2JHVq3LPk1OWdXofeI+/Ss= X-Google-Smtp-Source: AGHT+IE63XtNv7Ppv6ngf4MFG2LNQWLG2be9hsKRPUZYzfZGfW9trT7de+lSCFOGBkZ7ktBLExnPhDfoO1ca1vOOY9o= X-Received: by 2002:a05:6870:80d2:b0:259:877f:861d with SMTP id 586e51a60fabf-25d06910cc0mr6466596fac.0.1719256237704; Mon, 24 Jun 2024 12:10:37 -0700 (PDT) MIME-Version: 1.0 References: <20240623103539.1690600-1-mahmoudmatook.mm@gmail.com> In-Reply-To: From: Mahmoud Maatouq Date: Mon, 24 Jun 2024 23:10:26 +0400 Message-ID: Subject: Re: [PATCH] net/mlx5: fix memleak for resource object To: Dariusz Sosnowski Cc: Slava Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad , "dev@dpdk.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 06/24, Dariusz Sosnowski wrote: > Hi, > > Thank you very much for the fix. > > Could you please provide the commit message explaining the problem reported by Coverity and the fix? I thought of doing that, but found Coverity report already explained it, so i was afraid it could be redundant, but I'll add it as a quick explanation > > > -----Original Message----- > > From: Mahmoud Maatuq > > Sent: Sunday, June 23, 2024 12:36 > > To: Dariusz Sosnowski ; Slava Ovsiienko > > ; Bing Zhao ; Ori Kam > > ; Suanming Mou ; Matan Azrad > > > > Cc: dev@dpdk.org; Mahmoud Maatuq > > Subject: [PATCH] net/mlx5: fix memleak for resource object > > > > Coverity issue: 426424 > > Fixes: e78e5408da89 ("net/mlx5: remove cache term from the list utility") > > The issue was introduced in commit 27d171b88031 ("net/mlx5: abstract flow action and enable reconfigure"). > Fixes tag should reference that commit. how to get the proper commit that introduced the issue, as I used git blame to get the above mentioned commit > > > Cc: matan@nvidia.com > > > > Signed-off-by: Mahmoud Maatuq > > --- > > drivers/net/mlx5/mlx5_flow_dv.c | 5 ++++- > > 1 file changed, 4 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c > > index d46beffd4c..1010b8e423 100644 > > --- a/drivers/net/mlx5/mlx5_flow_dv.c > > +++ b/drivers/net/mlx5/mlx5_flow_dv.c > > @@ -12010,9 +12010,12 @@ flow_matcher_create_cb(void *tool_ctx, void > > *cb_ctx) > > items = *((const struct rte_flow_item **)(ctx->data2)); > > resource->matcher_object = mlx5dr_bwc_matcher_create > > (resource->group->tbl, resource->priority, items); > > - if (!(resource->matcher_object)) > > + if (!(resource->matcher_object)) { > > While we're at it, could you please remove the parentheses around resource->matcher_object? They're redundant. > > > + mlx5_free(resource); > > return NULL; > > + } > > #else > > + mlx5_free(resource); > > return NULL; > > #endif > > } > > -- > > 2.43.0 > > Best regards, > Dariusz Sosnowski >