From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id 136EEF04; Wed, 13 Sep 2017 04:41:29 +0200 (CEST) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 12 Sep 2017 19:41:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,385,1500966000"; d="scan'208";a="128196056" Received: from dpdk11.sh.intel.com ([10.67.110.198]) by orsmga004.jf.intel.com with ESMTP; 12 Sep 2017 19:41:27 -0700 From: Jingjing Wu To: beilei.xing@intel.com Cc: dev@dpdk.org, jingjing.wu@intel.com, stable@dpdk.org Date: Wed, 13 Sep 2017 03:23:51 +0800 Message-Id: <1505244231-51364-1-git-send-email-jingjing.wu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1505244002-51248-1-git-send-email-jingjing.wu@intel.com> References: <1505244002-51248-1-git-send-email-jingjing.wu@intel.com> Subject: [dpdk-dev] [PATCH v2] net/i40e: fix memory leak if VF init fails 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: , X-List-Received-Date: Wed, 13 Sep 2017 02:41:30 -0000 Cc: stable@dpdk.org Fixes: 4861cde46116 ("i40e: new poll mode driver") Signed-off-by: Jingjing Wu --- v2 change: - free aq_resp at err_aq drivers/net/i40e/i40e_ethdev_vf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index f6d8293..1206af1 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1317,7 +1317,9 @@ i40evf_init_vf(struct rte_eth_dev *dev) err_alloc: rte_free(vf->vf_res); + vf->vsi_res = NULL; err_aq: + rte_free(vf->aq_resp); i40e_shutdown_adminq(hw); /* ignore error */ err: return -1; -- 2.7.4