Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2495803imm; Mon, 24 Sep 2018 05:28:04 -0700 (PDT) X-Google-Smtp-Source: ACcGV61YnEkedjeNwuS2NtzJMpDwJ3Qvj5eeWUwBwcnYuEYdp3rYmYrABLEQ5X5ZDF0KgHWMJ7S8 X-Received: by 2002:a17:902:d688:: with SMTP id v8-v6mr10685365ply.79.1537792084055; Mon, 24 Sep 2018 05:28:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537792084; cv=none; d=google.com; s=arc-20160816; b=pcfGwceHOZ+N9Uh7P1v9QQ5vnxP4aMQvgzuYmtxExS/7hE9HHB+2YKYZWT/5YFEBnG PBxq7jtFiZ2exPY630aGzTe8iMaKmpp4bnaVmwVaPA20nVs/mbgbZTyy+zIGknqN/FFp 25KDkODA9UDEFHTCHDkdQAnAi2U7soz4ZCN3GF5dg65Td/TFBV93s7zPQExpIIAYYNu8 nJUyhWQ9hSO0V2I9Xct7qEUq2Re9h3AwGXrGt9mnzev3bxpCJDqaa7cs4xKZK+2oB28L JJXg+3Sf0Xx4Yi5afZYfQzlcUqXLF3VsXccjfc6jMk+ClKhJEtYJzmFMiPs8cpKNvwRD oS1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from; bh=K2/6ewsyNZJezh02XwayDMskamgLFTmLmxDdslscCb0=; b=PXBwOH0Re4am3gidLEgylbRLLTdpLbdpCm+Bc5O2s+aUEvkPprXR0yCCv6QuiElbls crnz/HunULCj9RQ8NyHi0RhQN3Z3/qn9kM7uCsLy4AumAjCTE3H2LY+JFjafQbcV11TK PFuXcGG6p+otNcdV3CMhjzbLjpzf22PM7qRwMWpEskDEWscb4BIOlho/wyU+TKnbA+lq R7Au2pH+pemrJKtxUAJxwSPYa4iuMu14Dbf0+RZSsWTa5Ze8rQSFCa8qN0i/BZyIhB2j 7UjV+v/V8vp8IXszcyKk2DUnTAmtF8fdWlcfDRrCpr5z2266UoQJQDqFn6q47aYZwmow JxgA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u64-v6si33983578pgu.533.2018.09.24.05.27.48; Mon, 24 Sep 2018 05:28:04 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733197AbeIXS2r (ORCPT + 99 others); Mon, 24 Sep 2018 14:28:47 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:57180 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732223AbeIXS2q (ORCPT ); Mon, 24 Sep 2018 14:28:46 -0400 Received: from localhost (ip-213-127-77-73.ip.prioritytelecom.net [213.127.77.73]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 232621094; Mon, 24 Sep 2018 12:26:51 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Petr Oros , Ivan Vecera , "David S. Miller" Subject: [PATCH 4.18 001/235] be2net: Fix memory leak in be_cmd_get_profile_config() Date: Mon, 24 Sep 2018 13:49:47 +0200 Message-Id: <20180924113104.195024203@linuxfoundation.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20180924113103.999624566@linuxfoundation.org> References: <20180924113103.999624566@linuxfoundation.org> User-Agent: quilt/0.65 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.18-stable review patch. If anyone has any objections, please let me know. ------------------ From: Petr Oros [ Upstream commit 9d7f19dc4673fbafebfcbf30eb90e09fa7d1c037 ] DMA allocated memory is lost in be_cmd_get_profile_config() when we call it with non-NULL port_res parameter. Signed-off-by: Petr Oros Reviewed-by: Ivan Vecera Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/emulex/benet/be_cmds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/net/ethernet/emulex/benet/be_cmds.c +++ b/drivers/net/ethernet/emulex/benet/be_cmds.c @@ -4500,7 +4500,7 @@ int be_cmd_get_profile_config(struct be_ port_res->max_vfs += le16_to_cpu(pcie->num_vfs); } } - return status; + goto err; } pcie = be_get_pcie_desc(resp->func_param, desc_count,