From 1af9bc9c60291e43aa26f8ee92371c8b04a9b55f Mon Sep 17 00:00:00 2001 From: Ferruh Yigit Date: Tue, 13 Nov 2018 23:31:37 +0000 Subject: [PATCH] test/reorder: fix out of bound access The value of array index 'i' is out of bound because of the previous loop it has been used. Assuming intention is using '0' since the check before free is robufs[0] check, fixing according. Fixes: ecd867faa860 ("test/reorder: fix freeing mbuf twice") Cc: stable@dpdk.org Signed-off-by: Ferruh Yigit --- test/test/test_reorder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test/test_reorder.c b/test/test/test_reorder.c index ccee4d086a..58fa9c71b5 100644 --- a/test/test/test_reorder.c +++ b/test/test/test_reorder.c @@ -269,7 +269,7 @@ test_reorder_drain(void) goto exit; } if (robufs[0] != NULL) - rte_pktmbuf_free(robufs[i]); + rte_pktmbuf_free(robufs[0]); /* Insert more packets * RB[] = {NULL, NULL, NULL, NULL} -- 2.20.1