[dpdk-dev] [PATCH] net/vmxnet3: uninitialized variable fix

Yogev Chaimovich yogev at cgstowernetworks.com
Thu May 16 09:10:38 CEST 2019


Coverity issue: 323479
Fixes: 30f77abe net/vmxnet3: support stats reset
Cc: stable at dpdk.org

Signed-off-by: yogev ch <yogev at cgstowernetworks.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index f54536b..c465996 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1132,8 +1132,8 @@ static int eth_vmxnet3_pci_remove(struct rte_pci_device *pci_dev)
 {
 	unsigned int i;
 	struct vmxnet3_hw *hw = dev->data->dev_private;
-	struct UPT1_TxStats txStats;
-	struct UPT1_RxStats rxStats;
+	struct UPT1_TxStats txStats = {0};
+	struct UPT1_RxStats rxStats = {0};
 
 	VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_STATS);
 
-- 
1.9.1



More information about the dev mailing list