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 734B0454D0; Sun, 23 Jun 2024 12:35:50 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B312C402A8; Sun, 23 Jun 2024 12:35:49 +0200 (CEST) Received: from mail-wm1-f54.google.com (mail-wm1-f54.google.com [209.85.128.54]) by mails.dpdk.org (Postfix) with ESMTP id 6F8204026B for ; Sun, 23 Jun 2024 12:35:48 +0200 (CEST) Received: by mail-wm1-f54.google.com with SMTP id 5b1f17b1804b1-421820fc26dso29325905e9.2 for ; Sun, 23 Jun 2024 03:35:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1719138948; x=1719743748; darn=dpdk.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=e/hhwBMnZMS/QetZpXbGzqQL3IB9fwIF+b45mzWLkp0=; b=A63Cs3YOPM0FvFPI7/IC9TmNVbdSRQaQVbxkKP/Xi35n2M5rb/Azbo9UiseWH9HDbQ jaa4sEAY5uZuqxIy+xITmlAYQiiDRflVow+8xqKGmGbjtAlc9vp4BO377zE6lg3YesC/ jMTZS+p/+a2omfZCqjSdww04ME5D4Cm3S/ncqmjOFoVaRwgio6rovruxmHcto1BL7ymX T0+Yq4jltYej3NTsfznkHnAsaGlqvdYHwaGQaRuiOKoW7203XlAyxfDFfqVJhYIlJrUH v1ELvGWETV848OgLb+R+b22yJOSvHg+kja21d/LboRCvAhFzExxOzGcpTBjEf8kiTcNC Kjpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719138948; x=1719743748; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=e/hhwBMnZMS/QetZpXbGzqQL3IB9fwIF+b45mzWLkp0=; b=oDhtKUMVvy0OZG3wnBmMELipVWAWHvaSmBoVHdVRvv/UldOXI2Pr57CTZ6IuPMY1eF SRrKpVDN6KZhEBymiKg03MYOWab5Wa6QCwsaNw7iUwAAMwxsiPgxZPaHAqtHDvVX+GB3 akJZqmsdYbJgKjfzI+oavAbDdIO0hjFcaLiHfy/G45dD1GgaaRjHqyFH84RA5jB45vAg 0cxXOniYO3HCIH7T/XpppgbeVQ1HJHUhJBtPboPTTNyXeTfM46ZLUrdVIPtW0x25Lrns 3SU7mjGPN+6nGau2u2fWIVlEsGeKi91gzsryLJDpDQaRA8NUYCzCCRCamtkr//OjFAfY QgAw== X-Gm-Message-State: AOJu0Yzbc63ZWHDJutcsQatcKKXeHNLngOvjieAW1xHzAXC2mwUU+q/T ucLXxtgqxdLidNpidLkKW4Ps8Hdc0Pw8yeCBmmGZgsLZAls7XXHo X-Google-Smtp-Source: AGHT+IFENCZmKtaiI6Zw676w2BZPr/xsxwPd9m2Omvr46gMck33NFrRY8mkhHBvp80OUeILCqIjWrA== X-Received: by 2002:a05:600c:68d7:b0:424:8c1a:abb5 with SMTP id 5b1f17b1804b1-4248c1aac15mr16858345e9.1.1719138947582; Sun, 23 Jun 2024 03:35:47 -0700 (PDT) Received: from localhost.localdomain.xyz (bba-2-50-153-93.alshamil.net.ae. [2.50.153.93]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42481910d51sm101095425e9.32.2024.06.23.03.35.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 23 Jun 2024 03:35:47 -0700 (PDT) From: Mahmoud Maatuq To: Dariusz Sosnowski , Viacheslav Ovsiienko , Bing Zhao , Ori Kam , Suanming Mou , Matan Azrad Cc: dev@dpdk.org, Mahmoud Maatuq Subject: [PATCH] net/mlx5: fix memleak for resource object Date: Sun, 23 Jun 2024 14:35:39 +0400 Message-ID: <20240623103539.1690600-1-mahmoudmatook.mm@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Coverity issue: 426424 Fixes: e78e5408da89 ("net/mlx5: remove cache term from the list utility") 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)) { + mlx5_free(resource); return NULL; + } #else + mlx5_free(resource); return NULL; #endif } -- 2.43.0