ChangeSet 1.1595.7.15, 2003/07/30 13:15:39-07:00, greg@kroah.com [PATCH] USB: fix memory leak in auerswald driver. Thanks to Joilnen Leite for pointing this out. drivers/usb/misc/auerswald.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) diff -Nru a/drivers/usb/misc/auerswald.c b/drivers/usb/misc/auerswald.c --- a/drivers/usb/misc/auerswald.c Fri Aug 1 10:55:07 2003 +++ b/drivers/usb/misc/auerswald.c Fri Aug 1 10:55:07 2003 @@ -774,7 +774,7 @@ /* requirement: auerbuf_init() */ static int auerbuf_setup (pauerbufctl_t bcp, unsigned int numElements, unsigned int bufsize) { - pauerbuf_t bep; + pauerbuf_t bep = NULL; dbg ("auerbuf_setup called with %d elements of %d bytes", numElements, bufsize); @@ -801,6 +801,7 @@ bl_fail:/* not enough memory. Free allocated elements */ dbg ("auerbuf_setup: no more memory"); + kfree(bep); auerbuf_free_buffers (bcp); return -ENOMEM; }