Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp840066pxb; Tue, 9 Nov 2021 00:42:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJz4b4G/rswt0Hoqpy9Pue442YJZxuHodvbouZSm6zjtEECkxlpSPhIJcq5tNcePyGdlbAoc X-Received: by 2002:a05:6402:12c9:: with SMTP id k9mr7581774edx.364.1636447346602; Tue, 09 Nov 2021 00:42:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1636447346; cv=none; d=google.com; s=arc-20160816; b=JMhXqmadMRuxUZa+xuvicAMz2YvE9a/kBA4+p+m5L7diqHmy8t1R51jBeNLAG0Ucq0 7kLX6RbvPEtLi4BZ7BQ71fbuqApNBKV7VNZqKuBzNAAZin+MO6J2p6Xz1u71tLx48SA5 2wnIRhJj+wwyRhTMPMUG/PkcV6NbLvoPKNG7JuPBvC6gAqbI+6oR1tS2yFQKmQAUuMC3 ZZOGwhljmAtwoic5cZUVuk90L3orrKHGesyusTEiM5vgZ6QZx/jLOSLl+2TvScLszpB2 dhAVBNaXRAno80NeYRS/jGGGnj4fHLXOa36XePIbKyvxbcOI2eOUVaB2isah8omPUjSX sUKA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=COK5kbZ9ztTQjZE7ZGYKUKIra6uHIQHAhj0H28gLm2A=; b=JiIZUDWBTpqjm6GewbnAM9dvuuCQRgymgXaQNoI++LJ5Cw+ls2ECgssmsDFKUk//88 +aedzMRt9MAj0JXLu+4A1f6ZK55OIT5TDMNCwkfnaHpt4C8fIKZ0DZn6AAkg92H7+RuD I35iZULGeyr91o3JJHD+on2VERox3QGr7sTJZrmfzprWszGufQiQf03vb5xs6TbiBMXg Wa2ENTcmS2YB+m4WczJiFj77ADFhbHkRSnl0h91xoi5TnoSIvX1cMqQAD95AdCZDlLrv nrwN/DxZLpwc5IhWMScww9Pa+LEiGCj25CGl8sBNjom9JzXBges7tN6ym16PsIL97F1D TQlA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Agh7yvoz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id fp7si26475899ejc.326.2021.11.09.00.41.56; Tue, 09 Nov 2021 00:42:26 -0800 (PST) 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=k20201202 header.b=Agh7yvoz; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237717AbhKIBFT (ORCPT + 99 others); Mon, 8 Nov 2021 20:05:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:60936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241746AbhKIBEC (ORCPT ); Mon, 8 Nov 2021 20:04:02 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id DFA34617E4; Tue, 9 Nov 2021 01:01:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1636419677; bh=fJKt79npfQTWKKmxqFy13G2LlyTw9LUirXRUVbIsj2g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Agh7yvozJSN9dS2DV1b9ww271TMYs2NNmedHPyGcp0V0rXKonHfeLUm0tLC03KMFn NWcCwewNsjghm2H6sJ5tf4xEnu5FY5xJnBvtqpvTSuysrL4375SCsTyg3SFCDJHEjs AlcFYc+FgOrIghS0JOGpBfxyrSCE7mzuAGC6VcaJn/t96sR7RK1vq6ZqlmTuGEW3gW 4u1lP3aY78H9KwCNN5jrSmtHuvC8/pThSXgwijNB1q4EHow8GsGD7XKecg9JTjW6Fg vyl2kdVuVRP8SOfPA9q65nmCgtdNDp640hp4PUnO3au3FuFDOhNoCcOKW/9O3i36xj swKe3Vnvkey9g== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Evgeny Novikov , Hans Verkuil , Mauro Carvalho Chehab , Sasha Levin , dwlsalmeida@gmail.com, mchehab@kernel.org, linux-media@vger.kernel.org Subject: [PATCH AUTOSEL 5.15 045/146] media: vidtv: Fix memory leak in remove Date: Mon, 8 Nov 2021 12:43:12 -0500 Message-Id: <20211108174453.1187052-45-sashal@kernel.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20211108174453.1187052-1-sashal@kernel.org> References: <20211108174453.1187052-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Evgeny Novikov [ Upstream commit 76e21bb8be4f5f987f3006d197196fe6af63f656 ] vidtv_bridge_remove() releases and cleans up everything except for dvb itself. The patch adds this missed release. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Evgeny Novikov Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sasha Levin --- drivers/media/test-drivers/vidtv/vidtv_bridge.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/test-drivers/vidtv/vidtv_bridge.c b/drivers/media/test-drivers/vidtv/vidtv_bridge.c index 75617709c8ce2..0f6d998d18dc0 100644 --- a/drivers/media/test-drivers/vidtv/vidtv_bridge.c +++ b/drivers/media/test-drivers/vidtv/vidtv_bridge.c @@ -557,6 +557,7 @@ static int vidtv_bridge_remove(struct platform_device *pdev) dvb_dmxdev_release(&dvb->dmx_dev); dvb_dmx_release(&dvb->demux); dvb_unregister_adapter(&dvb->adapter); + kfree(dvb); dev_info(&pdev->dev, "Successfully removed vidtv\n"); return 0; -- 2.33.0