lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1265801743-26079-1-git-send-email-laurent.pinchart@ideasonboard.com>
Date:	Wed, 10 Feb 2010 12:35:43 +0100
From:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:	gregkh@...e.de
Cc:	kay.sievers@...y.org, linux-kernel@...r.kernel.org,
	artem.bityutskiy@...ia.com
Subject: [PATCH] class: Free the class private data in class_unregister

Fix a memory leak by freeing the memory allocated in __class_register
for the class private data.

Signed-off-by: Laurent Pinchart <laurent.pinchart@...asonboard.com>
---
 drivers/base/class.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/base/class.c b/drivers/base/class.c
index 161746d..a9449b3 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -200,6 +200,7 @@ void class_unregister(struct class *cls)
 	pr_debug("device class '%s': unregistering\n", cls->name);
 	remove_class_attrs(cls);
 	kset_unregister(&cls->p->class_subsys);
+	kfree(cls->p);
 }
 
 static void class_create_release(struct class *cls)
-- 
1.6.4.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ