Message ID | e17bdefa7cb067127338a655a0ba6d972926c667.1684000646.git.mchehab@kernel.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp5907839vqo; Sat, 13 May 2023 11:09:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ54rcx7ANTP1YlZ9576P0iBIBtvvq0oA1rF0+9AVx3bC0+0WJeh2odXjwdWx1zfkDqlT6Yn X-Received: by 2002:a17:90a:4618:b0:250:6bd9:cf6 with SMTP id w24-20020a17090a461800b002506bd90cf6mr24109163pjg.15.1684001376114; Sat, 13 May 2023 11:09:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684001376; cv=none; d=google.com; s=arc-20160816; b=SNZqB3iVauz+DmE/Q0+G+VBWy0PleD4RGOi9HSQl6PYJyZz4N+GcP7nK/+10bBm6Qc muZSYIF3+b+fsbf2jfJfX3bXC+qAOytzfmZBHpWWaDbe9D3cp1XX3rDzFcJY8FPStkeZ DLO191osnJr28WK9fvzlcaJrfRe/DA9r7g0JxahOMoTrfrztMAX+ygiVkO/2ULgMr7cs kgYvn19YQvcyhIxOfKitwtepDCYC1rsTfgqlMn1meNXZlq80e4pWLssFlHKM0kWVlb1I mp60BkSRSPkvyi8t4DjDY+goMGcQYCPFRJjnrBB1GJlhUpaSdBJP9wUmMhcoSOSSziGg c9xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:to:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:from :dkim-signature; bh=UakQAfL4kVHHGATtwtbKdeydShcZkAIYlLo3MKkmyTg=; b=Y4ZqGK3nGZRUsWgc8UgNdBbeBeVGfunjuSV9TzujBx3hC0NqsWGNglYOlhuhYaIQYG CFC6VKkaHbh+2icbEc/6Phy0jr5xvYBE1Uw+/qzeErqqadWtbrERLuHHkxrHsefgwUdh 8qVkpeIGAUQS0NzBXWngz4u9tEQ+T2ZZF++auAvcdmFzm4eb2tL1+Nqn5XbE8360iy4G 2+tS1kQ5V4IgdYyqQ0D+wsGk+al9ZY0WfXccxFZViDlbk2l/VlqvyIr0CPlK1Y7qwHc7 IxH4PwqZueli1FJkK4RSwP9ngoJ8S1/Xo6PuLqeY/v8i7pl5DqJpjqoSzp4vuHNK+thJ w7Gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=raff74dC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id mh12-20020a17090b4acc00b0024784735e4esi28111264pjb.115.2023.05.13.11.09.23; Sat, 13 May 2023 11:09:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@kernel.org header.s=k20201202 header.b=raff74dC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S235718AbjEMR6B (ORCPT <rfc822;peekingduck44@gmail.com> + 99 others); Sat, 13 May 2023 13:58:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232868AbjEMR5t (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 13 May 2023 13:57:49 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F8EC2D47; Sat, 13 May 2023 10:57:48 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4387561BD4; Sat, 13 May 2023 17:57:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 31992C433A7; Sat, 13 May 2023 17:57:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1684000666; bh=J1xoW9gW0spcZlEaPWtrphQr2z//OomZ0xML5nO1YK0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=raff74dCv9qtXOKIad6sxVVbphnmh3fiAjDaMlT7px1upF5vwUl+g4cBd2kdpDCtD LgDe9/mbg4/3UJt/MTz+Y33ZoORcye+jrvhIrPWoNmxf7EXV2/CdFJp6anMHt9p3Jc /JggJ8JJnF6D/cD/E7R2AbJAbB+Tds/eGJVOUiheqT2el2UJy06mMwkeKpjh5uHJVH 7Hx2l2ktiFCq/EbPUJoiplvBBu3NjWZWZwdwVrRoRGCZwg1uYk8xrIJOmnscbBjC4p YbDMJST5zP2vZlhGs4C0VPkbx18kJ2ArFXdLuwVVHt85xy/3ZMSJ1b+yq6ZlyQw3GZ i5Ly+Af/c0fOw== Received: from mchehab by mail.kernel.org with local (Exim 4.96) (envelope-from <mchehab@kernel.org>) id 1pxtV1-001txz-1T; Sat, 13 May 2023 18:57:43 +0100 From: Mauro Carvalho Chehab <mchehab@kernel.org> Cc: Hyunwoo Kim <imv4bel@gmail.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Subject: [PATCH 12/24] media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb() Date: Sat, 13 May 2023 18:57:29 +0100 Message-Id: <e17bdefa7cb067127338a655a0ba6d972926c667.1684000646.git.mchehab@kernel.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <53558de2b5c4f4ee6bfcfbe34e27071c2d0073d5.1684000646.git.mchehab@kernel.org> References: <53558de2b5c4f4ee6bfcfbe34e27071c2d0073d5.1684000646.git.mchehab@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net To: unlisted-recipients:; (no To-header on input) Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1765803426722764318?= X-GMAIL-MSGID: =?utf-8?q?1765803426722764318?= |
Series |
[01/24] media: pvrusb2: fix DVB_CORE dependency
|
|
Commit Message
Mauro Carvalho Chehab
May 13, 2023, 5:57 p.m. UTC
From: Hyunwoo Kim <imv4bel@gmail.com> Since dvb_frontend_detach() is not called in ttusb_dec_exit_dvb(), which is called when the device is disconnected, dvb_frontend_free() is not finally called. This causes a memory leak just by repeatedly plugging and unplugging the device. Fix this issue by adding dvb_frontend_detach() to ttusb_dec_exit_dvb(). Link: https://lore.kernel.org/linux-media/20221117045925.14297-5-imv4bel@gmail.com Signed-off-by: Hyunwoo Kim <imv4bel@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org> --- drivers/media/usb/ttusb-dec/ttusb_dec.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/media/usb/ttusb-dec/ttusb_dec.c b/drivers/media/usb/ttusb-dec/ttusb_dec.c index 38822cedd93a..c4474d4c44e2 100644 --- a/drivers/media/usb/ttusb-dec/ttusb_dec.c +++ b/drivers/media/usb/ttusb-dec/ttusb_dec.c @@ -1544,8 +1544,7 @@ static void ttusb_dec_exit_dvb(struct ttusb_dec *dec) dvb_dmx_release(&dec->demux); if (dec->fe) { dvb_unregister_frontend(dec->fe); - if (dec->fe->ops.release) - dec->fe->ops.release(dec->fe); + dvb_frontend_detach(dec->fe); } dvb_unregister_adapter(&dec->adapter); }