From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ferruh Yigit Subject: [PATCH] test/reorder: fix out of bound access Date: Tue, 13 Nov 2018 23:31:37 +0000 Message-ID: <20181113233137.7570-1-ferruh.yigit@intel.com> Cc: dev@dpdk.org, Ferruh Yigit , stable@dpdk.org To: Reshma Pattan Return-path: List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 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