Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3302058pxk; Mon, 21 Sep 2020 10:05:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyA8NGO43Bf3vno6HuqZBlvUjdkxQjSBs/RXkXAob81WkniIk//2nnPfstSr4qsHCMI6bj+ X-Received: by 2002:a17:906:d78c:: with SMTP id pj12mr457739ejb.36.1600707929352; Mon, 21 Sep 2020 10:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600707929; cv=none; d=google.com; s=arc-20160816; b=0SOb4dD512O6ikBEaHEsAW22zB2DFHfvektFAr+pZrbMu4VoeyJsUjSFs2WapqIF9x qhk5AOj0bBW5Ac52JVjk7Vf9H2hoU1hMQ4PG0VWtAQR9nVlAvcthNP1ZIx8+xuvjNTcS FO490RMOXv5uGH8NBzwLJCy1cCv+u87u/8OXlDa0o8hz4QgE1oCf6XNfGeie+LXdBjW0 6XySHeTgq5ngl7bWiOUVyg377tfno9IbEqAw5dUJLvsE1ZFJq8ll4YNVRkyjaZ01mXG/ xUsA2XEGrItKSMW3m+dKb5iAhQRQbIbed5pbN3sGP9cnxJg2sgv72MuheNHYfzi6syRN djtg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=7juYU2H+JZ+U3d7qusgQqu90J6OQeTeAY+L+8CwsJos=; b=Mm3KGAI06xUlL5Tn1hKtvKJiBxF4lX7fhaEfvk22KNJ16kM6PvbTOfFZh4mkELdbSp Lv13+napQFIMmAsnnZ+s+y7seCuJj/qNumHHwfqzRDsTDKD2OB+NcC76KUjdSsc6yaej 7g7Y70MA9kYUt1ckIni30qQBL5khrgO6ucWA0cvzhl+tPuoR45vK85iLHUMs/FECHYHx jf5sqyaNYtuFDZ0Uz1lkfDFYzdFmsHZPQ3zzzN64ZZ1Z7UdyQieBwIbWY2W9W+Id88YE pTm46Cbs2BTCvQySE7HeD37umDXfRRqcj7hEH/i8s6iwGfQVKmRLE2uslSc72pGxbp7I LxRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=b6Wva460; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x99si8833354ede.160.2020.09.21.10.05.03; Mon, 21 Sep 2020 10:05:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=b6Wva460; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730281AbgIURDe (ORCPT + 99 others); Mon, 21 Sep 2020 13:03:34 -0400 Received: from mail.kernel.org ([198.145.29.99]:37004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728104AbgIUQg5 (ORCPT ); Mon, 21 Sep 2020 12:36:57 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 93281238EE; Mon, 21 Sep 2020 16:36:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1600706217; bh=syf/mrawTOysmHCUC8/4Wh8OWhj5SiPsMX3nynqs+WI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b6Wva4606bLcIOmlM7V2Rz0lenYDbW2+8wn/ef5Ben9ajKb/Nm+CqFU1X/gdCe+3M 1THWM1iUkBrKoafAbba6SZszJdGLTdEe9syzqoY7qZPlydDD1OSV5mtpuriaOkWLNY 8V+jvzP/8te+/S24U3Sduq5teJiqBx9/52YQo+XE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dinghao Liu , "David S. Miller" , Sasha Levin Subject: [PATCH 4.14 13/94] firestream: Fix memleak in fs_open Date: Mon, 21 Sep 2020 18:27:00 +0200 Message-Id: <20200921162036.152828107@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200921162035.541285330@linuxfoundation.org> References: <20200921162035.541285330@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dinghao Liu [ Upstream commit 15ac5cdafb9202424206dc5bd376437a358963f9 ] When make_rate() fails, vcc should be freed just like other error paths in fs_open(). Signed-off-by: Dinghao Liu Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/atm/firestream.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c index 0e449ee11ac7f..e7cffd0cc3616 100644 --- a/drivers/atm/firestream.c +++ b/drivers/atm/firestream.c @@ -1013,6 +1013,7 @@ static int fs_open(struct atm_vcc *atm_vcc) error = make_rate (pcr, r, &tmc0, NULL); if (error) { kfree(tc); + kfree(vcc); return error; } } -- 2.25.1