Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp1385709ybp; Thu, 17 Oct 2019 12:01:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyY8TZgVooEKNEUAxNff8CmarmAvVTiEJ5bcXxtJijAl7EDHepZLlVhnod1kEOsKOlP+KwN X-Received: by 2002:a17:907:20b3:: with SMTP id pw19mr4933902ejb.76.1571338888054; Thu, 17 Oct 2019 12:01:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571338888; cv=none; d=google.com; s=arc-20160816; b=z6D3N2+ULjHOq8yXfhCleExUa+tQfzwUdZt4SKiBSnriiTXElE7w7icWZgSpzCu7u7 uBS7Lxc9CvpJ+qOs+jaLXkVXiIJ1yZCIqMHqAl40qgvlwW8D5fzS7KHm1uSDV6ChT2hg aWy+udSzYscytzI+/CY8+du5bRQfuTVAUsnrZ5eCedla2GBjs2Hz2Xl7hlHRL+6fSKjN SRNCzPh2PEG6tmV31MnWZZhGDPWF7eXCGf0Juxa+fpDpnCgoPNQqrTtNmRkfpU99pvYY QnYs2OKAOh1CBX68EMXQqvcdKAQ/DGk7YnZjNXBPNgvBsp34ppoo1aX6etSmA2M1APKE difw== 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:dkim-signature; bh=bYGgWG+Aw6iiWQ9BtnUzGRQTiEUvrWEng7AqtCTXZIo=; b=tp1+0DhUdYbo0G5ZT6JgYx28ZeMde2FYWrTAwprFpgLzTF37Vn7/nlYmx//pDzYClY aropLcyc87+UZOUVmdyJMT1zxkFw7ZOKbrUYb/5q50IX+fRDRH0DVDPhemix4VxnGcjQ unTLffmxQdLdvAkLani90/2L9uymgP8ayTg8p92m+8joTld18rJpEL8kNu5R0a5ihUsk r6qzvWjkwKcp4huu2bSp08Be7e3Sgvge9AxGiNfpkuY4v6u4xpzFI3f+mt6cZ4uDT7Zd vRUUOw4or3JZDhxjR/fgxNQRZUHQOa1aWiYuMbUt5YxZlIir8JWVnyBUYNSQ7MkJiIqM AmQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=XeG1Sdnl; 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 qo6si1983980ejb.386.2019.10.17.12.01.04; Thu, 17 Oct 2019 12:01:28 -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; dkim=pass header.i=@kernel.org header.s=default header.b=XeG1Sdnl; 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 S2439215AbfJPWLq (ORCPT + 99 others); Wed, 16 Oct 2019 18:11:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:48526 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2391459AbfJPV4i (ORCPT ); Wed, 16 Oct 2019 17:56:38 -0400 Received: from localhost (unknown [192.55.54.58]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D6D5021D7A; Wed, 16 Oct 2019 21:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1571262998; bh=+WHMJPY9Vs1h+DK/XD29qKX+c1rTvE9yIux+6B5TVKg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XeG1SdnlozZ+u4vgkWLWl14hJlLk3aOtoyDvxKk+T98MeGJ803nQJpglH+/dNjVD7 SkQVJc6+fWdTrSDEqS6o4pvG1SRIBsfJbuAqfVmOnZY+5WgoNV4tVSh2pR2oI9gq/U rVtsQLaT9BtGs/G/ECIdpv6ErDb7QCngIuIfSQEA= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Navid Emamdoost Subject: [PATCH 4.14 39/65] staging: vt6655: Fix memory leak in vt6655_probe Date: Wed, 16 Oct 2019 14:50:53 -0700 Message-Id: <20191016214829.600074955@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191016214756.457746573@linuxfoundation.org> References: <20191016214756.457746573@linuxfoundation.org> User-Agent: quilt/0.66 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 From: Navid Emamdoost commit 80b15db5e1e9c3300de299b2d43d1aafb593e6ac upstream. In vt6655_probe, if vnt_init() fails the cleanup code needs to be called like other error handling cases. The call to device_free_info() is added. Fixes: 67013f2c0e58 ("staging: vt6655: mac80211 conversion add main mac80211 functions") Signed-off-by: Navid Emamdoost Cc: stable Link: https://lore.kernel.org/r/20191004200319.22394-1-navid.emamdoost@gmail.com Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vt6655/device_main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/drivers/staging/vt6655/device_main.c +++ b/drivers/staging/vt6655/device_main.c @@ -1668,8 +1668,10 @@ vt6655_probe(struct pci_dev *pcid, const priv->hw->max_signal = 100; - if (vnt_init(priv)) + if (vnt_init(priv)) { + device_free_info(priv); return -ENODEV; + } device_print_info(priv); pci_set_drvdata(pcid, priv);