Re: PS/2- auxiliary device memmory leak fix.

Martin.Dalecki (dalecki@namu23.num.math.uni-goettingen.de)
Mon, 9 Sep 1996 13:28:26 +0200 (MET DST)


Hello Linus!

As far as I know there is currently no garbage collecting behind the
init_module() cleanup_module() mechanis present :-).

This one-liner fixes some interresting memmory leak, which I found in the driver
for the PS/2 auxiliary device. The queue is dynamically allocated in the
corresponding init_module routine few lines above.

Please include this in the next relase ...

Marcin

diff -cr char/psaux.c char/psaux.c
*** linux/drivers/char/psaux.c Mon Sep 9 10:36:22 1996
--- linux/drivers/char/psaux.c Mon Sep 9 10:37:21 1996
***************
*** 567,572 ****
--- 567,573 ----
void cleanup_module(void)
{
misc_deregister(&psaux_mouse);
+ kfree(queue);
}
#endif