Set to zero array of drained buffers after free, to prevent freeing them one more time. Discovered with enabled `RTE_LIBRTE_MEMPOOL_DEBUG`.
Fixes: ecd867faa860 ("test/reorder: fix freeing mbuf twice") Signed-off-by: Volodymyr Fialko <vfia...@marvell.com> --- app/test/test_reorder.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/test/test_reorder.c b/app/test/test_reorder.c index f0714a5c18..7b5e590bac 100644 --- a/app/test/test_reorder.c +++ b/app/test/test_reorder.c @@ -278,6 +278,7 @@ test_reorder_drain(void) goto exit; } rte_pktmbuf_free(robufs[0]); + memset(robufs, 0, sizeof(robufs)); /* Insert more packets * RB[] = {NULL, NULL, NULL, NULL} @@ -313,6 +314,7 @@ test_reorder_drain(void) for (i = 0; i < 3; i++) { rte_pktmbuf_free(robufs[i]); } + memset(robufs, 0, sizeof(robufs)); /* * RB[] = {NULL, NULL, NULL, NULL} -- 2.34.1