kaweth: Fix memory leak in kaweth_control()
commit566198152269f6aa1ed8735f7a857bf51b0f6007
authorKevin Cernekee <cernekee@gmail.com>
Sat, 19 Sep 2009 11:18:21 +0000 (19 11:18 +0000)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 5 Oct 2009 16:31:58 +0000 (5 09:31 -0700)
tree4a975f82d3dc9f98077e6976e1e106f77fc66ac6
parentfb6bf2b949962ae553cb07376f5b681bf09e476b
kaweth: Fix memory leak in kaweth_control()

commit 051b982bcc620695de629d29c333c95b66e9b95e upstream.

kaweth_control() never frees the buffer that it allocates for the USB
control message.  Test case:

while :; do ifconfig eth2 down ; ifconfig eth2 up ; done

This is a tiny buffer so it is a slow leak.  If you want to speed up the
process, you can change the allocation size to e.g. 16384 bytes, and it
will consume several megabytes within a few minutes.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
Acked-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/net/usb/kaweth.c