Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3327589imu; Sun, 11 Nov 2018 12:27:57 -0800 (PST) X-Google-Smtp-Source: AJdET5ebbWrSStoGZ7gBjNQh3WBC2fI5rQZduMV0EpdZZb+sxcyos/mZ986QJsAzkOf5u+dgOsHL X-Received: by 2002:a62:c20b:: with SMTP id l11-v6mr17880262pfg.251.1541968077427; Sun, 11 Nov 2018 12:27:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541968077; cv=none; d=google.com; s=arc-20160816; b=HsUvmPF14l13DWlYXS2CjMoT0Jtp6s8tXuaRIpt/bl42Y73GWD1lczkXNROII6MaBO eH+Vb6GoVXvu55v8hxJ+jAnTQvCqEQTy9ySLdl5s6ywSJ1dwc8cMKmowohGC7sk519DW M5FMA+k1CV0AvXFLUeNtC2XmuSYnfWTSOv5BpZqwMgXBO0xjv4iB5t2iquFzZah0fzlC w/Ue9q/MZ1ppNR3vICPz533fYqjna/PYnMJb3BvVbyjbAIgDIBWs8ijzxrVaFLciH6dM zC7JjgW4ckANRX1XBjVKN786OAX7+T6DtmIGCD9tL9ik2Fq6/kZ2dwfA8xHg7cudKS1b 1IFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition; bh=Gutyvf9YWOWiLAc2aKtAq7NC2bbaOw7FChlTvL7bL+s=; b=EdClyhS/whCFEs4jIr3Y0vHukM0ju8jHkBCfomzO3ahm4cFFVF2c1BKmwlaiLIRDg9 KnR3bQCg9wflnhtYH2IkNmQB8lcDmSemx3hiRQTzAxrASoWU3xq2FXcCRNspnRAd2lqf qVDsFCRtk888AdoWlOQ3eJFCjSUeQiC1CX2eYMRftF7Cj+bTbUZ1rzM+EtK9Np8keQCX DTQqv2Ak9Njb3+2daZiCOg0j38EfZVj/WfgieWlU8uoodXBN8AwmjoQyOaV8+d55jU1F RdaaYpLT3lvw1pTauVBhCgBSLhx+dCisDLzakoivXCI0Dg0X4xkqvsD+0s9GYaK83NtU pEuw== 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 o186-v6si16944470pfo.236.2018.11.11.12.27.42; Sun, 11 Nov 2018 12:27:57 -0800 (PST) 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 S1730931AbeKLGQk (ORCPT + 99 others); Mon, 12 Nov 2018 01:16:40 -0500 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:50842 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730611AbeKLFs0 (ORCPT ); Mon, 12 Nov 2018 00:48:26 -0500 Received: from [192.168.4.242] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gLvsk-0000oM-L5; Sun, 11 Nov 2018 19:58:54 +0000 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1gLvsY-0001nb-OV; Sun, 11 Nov 2018 19:58:42 +0000 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Anton Vasilyev" , "Marc Kleine-Budde" Date: Sun, 11 Nov 2018 19:49:05 +0000 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 302/366] can: ems_usb: Fix memory leak on ems_usb_disconnect() In-Reply-To: X-SA-Exim-Connect-IP: 192.168.4.242 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.61-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Anton Vasilyev commit 72c05f32f4a5055c9c8fe889bb6903ec959c0aad upstream. ems_usb_probe() allocates memory for dev->tx_msg_buffer, but there is no its deallocation in ems_usb_disconnect(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Anton Vasilyev Signed-off-by: Marc Kleine-Budde Signed-off-by: Ben Hutchings --- drivers/net/can/usb/ems_usb.c | 1 + 1 file changed, 1 insertion(+) --- a/drivers/net/can/usb/ems_usb.c +++ b/drivers/net/can/usb/ems_usb.c @@ -1084,6 +1084,7 @@ static void ems_usb_disconnect(struct us usb_free_urb(dev->intr_urb); kfree(dev->intr_in_buffer); + kfree(dev->tx_msg_buffer); } }