From patchwork Tue Nov 13 23:31:37 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ferruh Yigit X-Patchwork-Id: 48054 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D5F7D4F90; Wed, 14 Nov 2018 00:31:44 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id B31344CC7; Wed, 14 Nov 2018 00:31:42 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 13 Nov 2018 15:31:41 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.56,230,1539673200"; d="scan'208";a="96074099" Received: from silpixa00399752.ir.intel.com (HELO silpixa00399752.ger.corp.intel.com) ([10.237.222.212]) by FMSMGA003.fm.intel.com with ESMTP; 13 Nov 2018 15:31:40 -0800 From: Ferruh Yigit To: Reshma Pattan Cc: dev@dpdk.org, Ferruh Yigit , stable@dpdk.org Date: Tue, 13 Nov 2018 23:31:37 +0000 Message-Id: <20181113233137.7570-1-ferruh.yigit@intel.com> X-Mailer: git-send-email 2.17.2 Subject: [dpdk-dev] [PATCH] test/reorder: fix out of bound access X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list 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}