Matthew Dharm <[EMAIL PROTECTED]> writes:

> This should finish off the 2.4.x work for me.  After this, I'll be looking
> towards 2.5, unless something comes up to keep me with 2.4 issues.

What about this patch? It makes sure to clean up resources in two
error paths in storage_probe().

--- storage/usb.c.old   Sun Jan 13 09:59:16 2002
+++ storage/usb.c       Sun Jan 13 09:59:02 2002
@@ -951,6 +951,7 @@
                        ss->protocol_name = "Unknown";
                        kfree(ss->current_urb);
                        kfree(ss);
+                       usb_dec_dev_use(dev);
                        return NULL;
                        break;
                }
@@ -958,6 +959,8 @@
 
                /* allocate an IRQ callback if one is needed */
                if ((ss->protocol == US_PR_CBI) && usb_stor_allocate_irq(ss)) {
+                       kfree(ss->current_urb);
+                       kfree(ss);
                        usb_dec_dev_use(dev);
                        return NULL;
                }

-- 
Peter Osterlund - [EMAIL PROTECTED]
http://w1.894.telia.com/~u89404340

_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to