lkml.org 
[lkml]   [2003]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] [2.4] devio.c memleak on unexpected disconnect
Hello!

There is a memleak in devio.c (User space communication with USB devices)
recently added, it forgets to free the buffer if device was disconnected.

The patch is trivial, please apply.
Found with help of smatch.


===== drivers/usb/devio.c 1.17 vs edited =====
--- 1.17/drivers/usb/devio.c Mon Aug 19 20:49:38 2002
+++ edited/drivers/usb/devio.c Sun Sep 21 22:51:15 2003
@@ -1114,7 +1114,7 @@
usb_driver_release_interface (driver, ifp);
up (&driver->serialize);
} else
- return -ENODATA;
+ retval = -ENODATA;
break;

/* let kernel drivers try to (re)bind to the interface */
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:48    [W:0.019 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site