pdump: fix freeing statistics memzone
authorKonstantin Ananyev <konstantin.ananyev@intel.com>
Tue, 26 Oct 2021 11:53:01 +0000 (12:53 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Wed, 3 Nov 2021 11:53:03 +0000 (12:53 +0100)
commit53caecb8445b3dce4cb7bae235ad6023a828577c
tree4e1aae4448585a5034e92c0167612b79dcad7d09
parentf88b0b892204d071a46a629b00424a8d47055ba4
pdump: fix freeing statistics memzone

rte_pdump_init() always allocates new memzone for pdump_stats.
Though rte_pdump_uninit() never frees it.
So the following combination will always fail:
rte_pdump_init(); rte_pdump_uninit(); rte_pdump_init();
The issue was caught by pdump_autotest UT.
While first test run successful, any consecutive runs
of this test-case will fail.
Fix the issue by calling rte_memzone_free() for statistics memzone.

Fixes: 10f726efe26c ("pdump: support pcapng and filtering")

Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Reshma Pattan <reshma.pattan@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
lib/pdump/rte_pdump.c