lpm: fix freeing memory
authorWei Dai <wei.dai@intel.com>
Thu, 3 Nov 2016 10:15:59 +0000 (18:15 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Sun, 6 Nov 2016 22:46:03 +0000 (23:46 +0100)
commitc7e9d6a6ed90a022067f42727d5d1675a3f3df11
tree815f6c551a799254addcededc911d966cfe9149a
parentbf39fb4c5b76f81cbb4c66fa0998c161344cc409
lpm: fix freeing memory

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