DPDK patches and discussions
 help / color / mirror / Atom feed
From: "John W. Linville" <linville@tuxdriver.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [PATCH 3/4] i40e_vsi_release: do not use vsi until after NULL check
Date: Wed, 28 Sep 2016 15:20:03 -0400	[thread overview]
Message-ID: <1475090404-20707-4-git-send-email-linville@tuxdriver.com> (raw)
In-Reply-To: <1475090404-20707-1-git-send-email-linville@tuxdriver.com>

Coverity: 127556

Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
 drivers/net/i40e/i40e_ethdev.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index b04c833b2e04..d1f0f762b04c 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -4097,11 +4097,13 @@ i40e_vsi_release(struct i40e_vsi *vsi)
 	void *temp;
 	int ret;
 	struct i40e_mac_filter *f;
-	uint16_t user_param = vsi->user_param;
+	uint16_t user_param;
 
 	if (!vsi)
 		return I40E_SUCCESS;
 
+	user_param = vsi->user_param;
+
 	pf = I40E_VSI_TO_PF(vsi);
 	hw = I40E_VSI_TO_HW(vsi);
 
-- 
2.7.4

  parent reply	other threads:[~2016-09-28 19:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28 19:20 [dpdk-dev] [PATCH 0/4] random fixes for bugs identified by Coverity John W. Linville
2016-09-28 19:20 ` [dpdk-dev] [PATCH 1/4] ena_config_host_info: improve safety of string handling John W. Linville
2016-09-28 19:20 ` [dpdk-dev] [PATCH 2/4] bnxt_alloc_vnic_attributes: ensure entry_length is unsigned John W. Linville
2016-09-28 19:20 ` John W. Linville [this message]
2016-09-29  8:15   ` [dpdk-dev] [PATCH 3/4] i40e_vsi_release: do not use vsi until after NULL check Ferruh Yigit
2016-09-28 19:20 ` [dpdk-dev] [PATCH 4/4] bnxt_mac_addr_remove_op: add ULL suffix to constant 1 in bit shift John W. Linville
2016-09-29 17:39 ` [dpdk-dev] [PATCH v2 0/4] random fixes for bugs identified by Coverity John W. Linville
2016-09-29 17:39   ` [dpdk-dev] [PATCH v2 1/4] net/ena: improve safety of string handling in ena_config_host_info John W. Linville
2016-10-12 16:24     ` [dpdk-dev] [dpdk-stable] " Ferruh Yigit
2016-09-29 17:39   ` [dpdk-dev] [PATCH v2 2/4] net/bnxt: ensure entry_length is unsigned in bnxt_alloc_vnic_attributes John W. Linville
2016-09-29 19:06     ` Ajit Khaparde
2016-09-29 17:39   ` [dpdk-dev] [PATCH v2 3/4] net/i40e: do not use vsi until after NULL check in i40e_vsi_release John W. Linville
2016-09-29 17:39   ` [dpdk-dev] [PATCH v2 4/4] net/bnxt: add ULL suffix to constant 1 for bit shift in bnxt_mac_addr_remove_op John W. Linville
2016-10-10 18:41     ` Ajit Khaparde
2016-10-13  9:31   ` [dpdk-dev] [PATCH v2 0/4] random fixes for bugs identified by Coverity Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1475090404-20707-4-git-send-email-linville@tuxdriver.com \
    --to=linville@tuxdriver.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).