This is an automatic generated email to let you know that the following patch 
were queued at the 
http://git.linuxtv.org/media_tree.git tree:

Subject: [media] gspca: only set gspca->int_urb if submitting it succeeds
Author:  Hans de Goede <[email protected]>
Date:    Tue Oct 26 05:16:32 2010 -0300

Currently alloc_and_submit_int_urb() is setting gspca->int_urb
as soon as the allocation has succeeded, but if the subsequent
submit fails, the urb gets destroyed. And then later will
get destroyed again in gspca_input_destroy_urb() because
gspca->int_urb is set, leading to a double free.

Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

 drivers/media/video/gspca/gspca.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

---

http://git.linuxtv.org/media_tree.git?a=commitdiff;h=d0d3259ad31dab3541cab05392bed950e25ce278

diff --git a/drivers/media/video/gspca/gspca.c 
b/drivers/media/video/gspca/gspca.c
index dbd63c5..a089fca 100644
--- a/drivers/media/video/gspca/gspca.c
+++ b/drivers/media/video/gspca/gspca.c
@@ -224,12 +224,12 @@ static int alloc_and_submit_int_urb(struct gspca_dev 
*gspca_dev,
                buffer, buffer_len,
                int_irq, (void *)gspca_dev, interval);
        urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
-       gspca_dev->int_urb = urb;
        ret = usb_submit_urb(urb, GFP_KERNEL);
        if (ret < 0) {
                PDEBUG(D_ERR, "submit int URB failed with error %i", ret);
                goto error_submit;
        }
+       gspca_dev->int_urb = urb;
        return ret;
 
 error_submit:

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to