[PARPORT] memory leak in parport_procfs.c


Jochen Hoenicke (Jochen.Hoenicke@Informatik.Uni-Oldenburg.DE)
Fri, 3 Jul 98 16:33 MET DST


Hello,

I just found a small memory leak (this is against 2.1.107):

--- parport_procfs.c.orig Wed Jul 1 17:42:19 1998
+++ parport_procfs.c Wed Jul 1 17:43:59 1998
@@ -244,8 +244,11 @@
 
 void parport_proc_cleanup(void)
 {
- if (base) proc_unregister(&proc_root,base->low_ino);
- base = NULL;
+ if (base) {
+ proc_unregister(&proc_root,base->low_ino);
+ kfree(base);
+ base = NULL;
+ }
 }
 
 int parport_proc_register(struct parport *pp)

     Jochen

-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --



This archive was generated by hypermail 2.0b3 on Wed 30 Dec 1998 - 10:17:55 EST