patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: wenzhuo.lu@intel.com, qiming.yang@intel.com
Cc: dev@dpdk.org, xiaolong.ye@intel.com,
	Qi Zhang <qi.z.zhang@intel.com>,
	stable@dpdk.org,
	Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Subject: [dpdk-stable] [PATCH v2 19/63] net/ice/base: fix memory leak issue
Date: Thu, 29 Aug 2019 10:36:12 +0800	[thread overview]
Message-ID: <20190829023656.8220-20-qi.z.zhang@intel.com> (raw)
In-Reply-To: <20190829023656.8220-1-qi.z.zhang@intel.com>

Need to free new ice_vsig_prof if no valid ptype can be found.

Fixes: d935fb5bb091 ("net/ice/base: fix packet type size")
Cc: stable@dpdk.org

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/ice/base/ice_flex_pipe.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ice/base/ice_flex_pipe.c b/drivers/net/ice/base/ice_flex_pipe.c
index 73362c909..7daaf10b0 100644
--- a/drivers/net/ice/base/ice_flex_pipe.c
+++ b/drivers/net/ice/base/ice_flex_pipe.c
@@ -4918,8 +4918,10 @@ ice_add_prof_to_lst(struct ice_hw *hw, enum ice_block blk,
 		p->tcam[i].prof_id = map->prof_id;
 		p->tcam[i].tcam_idx = ICE_INVALID_TCAM;
 
-		if (ice_ptg_find_ptype(hw, blk, map->ptype[i], &ptg))
+		if (ice_ptg_find_ptype(hw, blk, map->ptype[i], &ptg)) {
+			ice_free(hw, p);
 			return ICE_ERR_CFG;
+		}
 
 		p->tcam[i].ptg = ptg;
 	}
-- 
2.13.6


  parent reply	other threads:[~2019-08-29  2:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190826105105.19121-1-qi.z.zhang@intel.com>
2019-08-26 10:50 ` [dpdk-stable] [PATCH 18/63] net/ice/base: resolve static analysis issues Qi Zhang
2019-08-26 10:50 ` [dpdk-stable] [PATCH 19/63] net/ice/base: fix memory leak issue Qi Zhang
2019-08-26 10:50 ` [dpdk-stable] [PATCH 21/63] net/ice/base: fix type-mismatch Qi Zhang
2019-08-26 10:50 ` [dpdk-stable] [PATCH 22/63] net/ice/base: correct overrun Coverty hit Qi Zhang
2019-08-26 10:50 ` [dpdk-stable] [PATCH 44/63] net/ice/base: fix for RSS hash on inner UDP port Qi Zhang
2019-08-26 10:50 ` [dpdk-stable] [PATCH 48/63] net/ice/base: fix flag settings in AQ call Qi Zhang
     [not found] ` <20190829023656.8220-1-qi.z.zhang@intel.com>
2019-08-29  2:36   ` [dpdk-stable] [PATCH v2 18/63] net/ice/base: resolve static analysis issues Qi Zhang
2019-08-29  2:36   ` Qi Zhang [this message]
2019-08-29  2:36   ` [dpdk-stable] [PATCH v2 21/63] net/ice/base: fix type-mismatch Qi Zhang
2019-08-29  2:36   ` [dpdk-stable] [PATCH v2 22/63] net/ice/base: correct overrun Coverty hit Qi Zhang
2019-08-29  2:36   ` [dpdk-stable] [PATCH v2 44/63] net/ice/base: fix for RSS hash on inner UDP port Qi Zhang
2019-08-29  2:36   ` [dpdk-stable] [PATCH v2 48/63] net/ice/base: fix flag settings in AQ call Qi Zhang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190829023656.8220-20-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=dev@dpdk.org \
    --cc=paul.m.stillwell.jr@intel.com \
    --cc=qiming.yang@intel.com \
    --cc=stable@dpdk.org \
    --cc=wenzhuo.lu@intel.com \
    --cc=xiaolong.ye@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).