From: Greg KH To: Marcelo Tosatti Cc: linux-usb-devel@lists.sourceforge.net Subject: [PATCH 2 of 5] USB pegasus driver bugfixes Hi, Here's a patch against 2.4.18-pre6 for the USB pegasus driver that fixes two memory leaks in the driver. This patch was done by Petko Manolov. thanks, greg k-h diff -Nru a/drivers/usb/pegasus.c b/drivers/usb/pegasus.c --- a/drivers/usb/pegasus.c Sat Jan 26 19:56:08 2002 +++ b/drivers/usb/pegasus.c Sat Jan 26 19:56:08 2002 @@ -883,6 +883,7 @@ if ( reset_mac(pegasus) ) { err("can't reset MAC"); unregister_netdev( pegasus->net ); + kfree(pegasus->net); kfree(pegasus); pegasus = NULL; return NULL; @@ -919,6 +920,7 @@ pegasus->flags |= PEGASUS_UNPLUG; unregister_netdev( pegasus->net ); usb_dec_dev_use( dev ); + kfree( pegasus->net ); kfree( pegasus ); pegasus = NULL; }