diff mbox series

test/reorder: fix out of bound access

Message ID 20181113233137.7570-1-ferruh.yigit@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers show
Series test/reorder: fix out of bound access | expand

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/mellanox-Performance-Testing success Performance Testing PASS
ci/intel-Performance-Testing success Performance Testing PASS

Commit Message

Ferruh Yigit Nov. 13, 2018, 11:31 p.m. UTC
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 <ferruh.yigit@intel.com>
---
 test/test/test_reorder.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Thomas Monjalon Nov. 14, 2018, 3:55 a.m. UTC | #1
14/11/2018 00:31, Ferruh Yigit:
> 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 <ferruh.yigit@intel.com>

Applied, thanks
diff mbox series

Patch

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}