Hi,

The Stanford Checker discovered a memory leak in cdc-acm.
This patch to 2.5.59 fixes it.  Please apply.

BTW, Vojtech, there was a possible memory leak identified
in usb/input/pid.c, but I wasn't sure about it.

~Randy
diff -Naur ./drivers/usb/class/cdc-acm.c%LEAK ./drivers/usb/class/cdc-acm.c
--- ./drivers/usb/class/cdc-acm.c%LEAK  Thu Jan 16 18:22:21 2003
+++ ./drivers/usb/class/cdc-acm.c       Tue Feb  4 21:33:55 2003
@@ -606,6 +606,7 @@
                if (!acm->ctrlurb) {
                        err("out of memory");
                        kfree(acm);
+                       kfree(buf);
                        return -ENOMEM;
                }
                acm->readurb = usb_alloc_urb(0, GFP_KERNEL);
@@ -613,6 +614,7 @@
                        err("out of memory");
                        usb_free_urb(acm->ctrlurb);
                        kfree(acm);
+                       kfree(buf);
                        return -ENOMEM;
                }
                acm->writeurb = usb_alloc_urb(0, GFP_KERNEL);
@@ -621,6 +623,7 @@
                        usb_free_urb(acm->readurb);
                        usb_free_urb(acm->ctrlurb);
                        kfree(acm);
+                       kfree(buf);
                        return -ENOMEM;
                }
 

Reply via email to