Message ID | 1266252846-12602-1-git-send-email-aaro.koskinen@nokia.com |
---|---|
State | Accepted |
Headers | show
Return-Path: <32nt5Sw0JCRs11IF.BFJB9E5EEFB91.3FDIK3-C9ELO7FF7C57IFLGJ.3FD@groups.bounces.google.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from mail-gx0-f200.google.com (mail-gx0-f200.google.com [209.85.217.200]) by ozlabs.org (Postfix) with ESMTP id 6BF4CB7C09 for <incoming@patchwork.ozlabs.org>; Tue, 16 Feb 2010 03:52:44 +1100 (EST) Received: by gxk24 with SMTP id 24sf12874820gxk.1 for <incoming@patchwork.ozlabs.org>; Mon, 15 Feb 2010 08:52:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:mime-version:x-beenthere:received :received:received:received:received-spf:received:received:received :received:from:to:cc:subject:date:message-id:x-mailer :x-originalarrivaltime:x-nokia-av:x-original-authentication-results :x-original-sender:reply-to:precedence:mailing-list:list-id :list-post:list-help:list-archive:x-thread-url:x-message-url:sender :list-subscribe:list-unsubscribe:content-type; bh=lOIfQnruAiFbPEWppOfwAyPZP++Q9F7UmSzKwMz3mXc=; b=HkUvF+ZY+fQzj3vNEg/L/wEMgyGZFVfsXToBrQzln2f5B6dzhc+pzZA+lH9+FC73eU i0PKxPE1kE34t0dZ7X62bxDgBVFJsyd/73RgvBJ8AOlWUfQwzqrlR51pOh9ocabf9kcR CspwFFwLnXWfTY6m7l3dOr36A8ndvtPGVIbwE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=mime-version:x-beenthere:received-spf:from:to:cc:subject:date :message-id:x-mailer:x-originalarrivaltime:x-nokia-av :x-original-authentication-results:x-original-sender:reply-to :precedence:mailing-list:list-id:list-post:list-help:list-archive :x-thread-url:x-message-url:sender:list-subscribe:list-unsubscribe :content-type; b=ctIHsx5Htv7w0ABiVnJANkK0osIMHqKlon0vFV5ItC60A+NBr3WAnOwOf/4DKjzai7 8Xe9VGwmExByY78SzkbhaA+HlitK5YiwjgkzAhB7IkXdyuMtWQY3Cf0RJAMbNiWosNEk gx/9TAbizhmLjyk3gXJ4VwwF4d0kII+wKlBPE= Received: by 10.150.132.14 with SMTP id f14mr539656ybd.84.1266252762191; Mon, 15 Feb 2010 08:52:42 -0800 (PST) MIME-Version: 1.0 X-BeenThere: rtc-linux@googlegroups.com Received: by 10.213.44.133 with SMTP id a5ls1059900ebf.1.p; Mon, 15 Feb 2010 08:52:40 -0800 (PST) Received: by 10.213.97.15 with SMTP id j15mr68647ebn.5.1266252760515; Mon, 15 Feb 2010 08:52:40 -0800 (PST) Received: by 10.213.97.15 with SMTP id j15mr68646ebn.5.1266252760474; Mon, 15 Feb 2010 08:52:40 -0800 (PST) Received: from mgw-mx06.nokia.com (smtp.nokia.com [192.100.122.233]) by gmr-mx.google.com with ESMTP id 11si1079072ewy.13.2010.02.15.08.52.40; Mon, 15 Feb 2010 08:52:40 -0800 (PST) Received-SPF: pass (google.com: domain of aaro.koskinen@nokia.com designates 192.100.122.233 as permitted sender) client-ip=192.100.122.233; Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o1FGqMhk027611; Mon, 15 Feb 2010 18:52:38 +0200 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 15 Feb 2010 18:52:34 +0200 Received: from mgw-sa02.ext.nokia.com ([147.243.1.48]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 15 Feb 2010 18:52:27 +0200 Received: from localhost.localdomain (corebot.research.nokia.com [172.21.41.254]) by mgw-sa02.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o1FGqPwp032369; Mon, 15 Feb 2010 18:52:25 +0200 From: Aaro Koskinen <aaro.koskinen@nokia.com> To: linux-kernel@vger.kernel.org, rtc-linux@googlegroups.com, a.zummo@towertech.it Cc: stable@kernel.org Subject: [rtc-linux] [PATCH] rtc-core: fix memory leak Date: Mon, 15 Feb 2010 18:54:06 +0200 Message-Id: <1266252846-12602-1-git-send-email-aaro.koskinen@nokia.com> X-Mailer: git-send-email 1.5.6.5 X-OriginalArrivalTime: 15 Feb 2010 16:52:27.0508 (UTC) FILETIME=[415ADB40:01CAAE5F] X-Nokia-AV: Clean X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of aaro.koskinen@nokia.com designates 192.100.122.233 as permitted sender) smtp.mail=aaro.koskinen@nokia.com X-Original-Sender: aaro.koskinen@nokia.com Reply-To: rtc-linux@googlegroups.com Precedence: list Mailing-list: list rtc-linux@googlegroups.com; contact rtc-linux+owners@googlegroups.com List-ID: <rtc-linux.googlegroups.com> List-Post: <http://groups.google.com/group/rtc-linux/post?hl=en_US>, <mailto:rtc-linux@googlegroups.com> List-Help: <http://groups.google.com/support/?hl=en_US>, <mailto:rtc-linux+help@googlegroups.com> List-Archive: <http://groups.google.com/group/rtc-linux?hl=en_US> X-Thread-Url: http://groups.google.com/group/rtc-linux/t/45fee3e618bcda42 X-Message-Url: http://groups.google.com/group/rtc-linux/msg/a46d8fc73b321145 Sender: rtc-linux@googlegroups.com List-Subscribe: <http://groups.google.com/group/rtc-linux/subscribe?hl=en_US>, <mailto:rtc-linux+subscribe@googlegroups.com> List-Unsubscribe: <http://groups.google.com/group/rtc-linux/subscribe?hl=en_US>, <mailto:rtc-linux+unsubscribe@googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 |
diff --git a/drivers/rtc/class.c b/drivers/rtc/class.c index be5a6b7..40845c7 100644 --- a/drivers/rtc/class.c +++ b/drivers/rtc/class.c @@ -226,6 +226,7 @@ static void __exit rtc_exit(void) { rtc_dev_exit(); class_destroy(rtc_class); + idr_destroy(&rtc_idr); } subsys_initcall(rtc_init);
The idr should be destroyed when the module is unloaded. Found with kmemleak. Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com> Cc: stable <stable@kernel.org> --- drivers/rtc/class.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)