lpm: fix missing free
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>
Mon, 21 Mar 2016 14:06:13 +0000 (15:06 +0100)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Tue, 22 Mar 2016 16:55:16 +0000 (17:55 +0100)
In rte_lpm_free lpm might not be freed if it didn't find a te (early return)

The two lpm interfaces rte_lpm_free_v20 and rte_lpm_free_v1604 had a leak.
rte_lpm_free_v20 might have missed to free rules_tbl
rte_lpm_free_v1604 due to an early exit might have missed to free
rules_tbl and lpm itself.

Fixes: 899d8bc9b3b5 ("lpm: make tailq fully local")

Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>

No differences found