提交 0e185b79 编写于 作者: E Eric Sesterhenn 提交者: Greg Kroah-Hartman

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: NEric Sesterhenn <snakebyte@gmx.de>
Acked-by: NAndy Gay <andy@andynet.net>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 c0fc0ee0
......@@ -134,6 +134,7 @@ static int airprime_open(struct usb_serial_port *port, struct file *filp)
}
urb = usb_alloc_urb(0, GFP_KERNEL);
if (!urb) {
kfree(buffer);
dev_err(&port->dev, "%s - no more urbs?\n",
__FUNCTION__);
result = -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册