aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/airprime.c
diff options
context:
space:
mode:
authorEric Sesterhenn <snakebyte@gmx.de>2006-10-10 17:42:50 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2006-10-17 17:46:33 -0400
commit0e185b7922ac81516c5c4653dcf6aacbf6341e73 (patch)
treeef16d187c31398203e44e884255a4a5e1a87026d /drivers/usb/serial/airprime.c
parentc0fc0ee06f6c9ab37f53afc62b0d94a700fa7a97 (diff)
USB: Memory leak in drivers/usb/serial/airprime.c
the commit http://www.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=5dda171202f94127e49c12daf780cdae1b4e668b added a memory leak. In case we cant allocate an urb, we dont free the buffer and leak it. Coverity id #1438 Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Acked-by: Andy Gay <andy@andynet.net> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/airprime.c')
-rw-r--r--drivers/usb/serial/airprime.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/usb/serial/airprime.c b/drivers/usb/serial/airprime.c
index 392a5129af64..ba93c72cdba0 100644
--- a/drivers/usb/serial/airprime.c
+++ b/drivers/usb/serial/airprime.c
@@ -134,6 +134,7 @@ static int airprime_open(struct usb_serial_port *port, struct file *filp)
134 } 134 }
135 urb = usb_alloc_urb(0, GFP_KERNEL); 135 urb = usb_alloc_urb(0, GFP_KERNEL);
136 if (!urb) { 136 if (!urb) {
137 kfree(buffer);
137 dev_err(&port->dev, "%s - no more urbs?\n", 138 dev_err(&port->dev, "%s - no more urbs?\n",
138 __FUNCTION__); 139 __FUNCTION__);
139 result = -ENOMEM; 140 result = -ENOMEM;