[dpdk-dev] [PATCH] test/reorder: fix out of bound access

Ferruh Yigit ferruh.yigit at intel.com
Wed Nov 14 00:31:37 CET 2018


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 at dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
---
 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 ccee4d086..58fa9c71b 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.17.2



More information about the dev mailing list