提交 adf8c021 编写于 作者: D Douglas Schilling Landgraf 提交者: Mauro Carvalho Chehab

V4L/DVB (8887): gspca: fix memory leak

Free allocated memory

Cc: Jean-Francois Moine <moinejf@free.fr>
Cc: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: NDouglas Schilling Landgraf <dougsland@linuxtv.org>
Signed-off-by: NMauro Carvalho Chehab <mchehab@redhat.com>
上级 dc2b80c1
......@@ -459,6 +459,8 @@ static int create_urbs(struct gspca_dev *gspca_dev,
urb = usb_alloc_urb(npkt, GFP_KERNEL);
if (!urb) {
err("usb_alloc_urb failed");
for (i = 0; i < n; i++)
usb_free_urb(gspca_dev->urb[i]);
return -ENOMEM;
}
urb->transfer_buffer = usb_buffer_alloc(gspca_dev->dev,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册