patches for DPDK stable branches
 help / color / mirror / Atom feed
From: Yuanhan Liu <yuanhan.liu@linux.intel.com>
To: Wei Dai <wei.dai@intel.com>
Cc: "Yuanhan Liu" <yuanhan.liu@linux.intel.com>,
	"Morten Brørup" <mb@smartsharesystems.com>,
	"dpdk stable" <stable@dpdk.org>
Subject: [dpdk-stable] patch 'lpm: fix freeing memory' has been queued to stable release 16.07.2
Date: Tue, 15 Nov 2016 19:40:23 +0800	[thread overview]
Message-ID: <1479210033-24775-3-git-send-email-yuanhan.liu@linux.intel.com> (raw)
In-Reply-To: <1479210033-24775-1-git-send-email-yuanhan.liu@linux.intel.com>

Hi,

FYI, your patch has been queued to stable release 16.07.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable
yet. It will be pushed if I get no objections before 11/19/16.
So please shout if anyone has objections.

Thanks.

	--yliu

---
>From 6c7778fd4e31b7fc8940b462becb0c441c25c052 Mon Sep 17 00:00:00 2001
From: Wei Dai <wei.dai@intel.com>
Date: Thu, 3 Nov 2016 18:15:59 +0800
Subject: [PATCH] lpm: fix freeing memory
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

[ upstream commit c7e9d6a6ed90a022067f42727d5d1675a3f3df11 ]
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

The memory pointed by lpm->rules_tbl should also be freed
when memory malloc for tbl8 fails in rte_lpm_create_v1604( ).
And the memory pointed by lpm->tbl8 should also be freed
when the lpm object is freed in rte_lpm_free_v1604( ).

Fixes: f1f7261838b3 ("lpm: add a new config structure for IPv4")

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Signed-off-by: Wei Dai <wei.dai@intel.com>
---
 lib/librte_lpm/rte_lpm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c
index 24fec4b..e1b5d94 100644
--- a/lib/librte_lpm/rte_lpm.c
+++ b/lib/librte_lpm/rte_lpm.c
@@ -321,6 +321,7 @@ rte_lpm_create_v1604(const char *name, int socket_id,
 
 	if (lpm->tbl8 == NULL) {
 		RTE_LOG(ERR, LPM, "LPM tbl8 memory allocation failed\n");
+		rte_free(lpm->rules_tbl);
 		rte_free(lpm);
 		lpm = NULL;
 		rte_free(te);
@@ -402,6 +403,7 @@ rte_lpm_free_v1604(struct rte_lpm *lpm)
 
 	rte_rwlock_write_unlock(RTE_EAL_TAILQ_RWLOCK);
 
+	rte_free(lpm->tbl8);
 	rte_free(lpm->rules_tbl);
 	rte_free(lpm);
 	rte_free(te);
-- 
1.9.0

  parent reply	other threads:[~2016-11-15 11:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-15 11:40 [dpdk-stable] patch 'eal/arm: fix file descriptor leak when getting CPU features' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'eal/ppc: " Yuanhan Liu
2016-11-15 11:40 ` Yuanhan Liu [this message]
2016-11-15 11:40 ` [dpdk-stable] patch 'pci: fix probing error if no driver found' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/ixgbe: fix VF registers' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'app/testpmd: fix DCB configuration' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/i40e: " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/enic: fix max packet length check' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/mlx5: fix handling of small mbuf sizes' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/mlx5: fix Rx checksum macros' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/vmxnet3: fix mbuf release on reset/stop' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'mempool: fix leak if populate fails' " Yuanhan Liu
2016-11-15 11:40 ` [dpdk-stable] patch 'net/virtio: revert fix restart' " Yuanhan Liu

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=1479210033-24775-3-git-send-email-yuanhan.liu@linux.intel.com \
    --to=yuanhan.liu@linux.intel.com \
    --cc=mb@smartsharesystems.com \
    --cc=stable@dpdk.org \
    --cc=wei.dai@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).