Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e7222ca9b4e6c6cdabedd8d33da59263ace85a02
Commit:     e7222ca9b4e6c6cdabedd8d33da59263ace85a02
Parent:     2f7362ef9bc9c41436c7f44212a2dcf12dddffbf
Author:     Florin Malita <[EMAIL PROTECTED]>
AuthorDate: Mon Oct 15 12:59:18 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Mon Oct 22 12:01:49 2007 -0200

    V4L/DVB (6350): V4L: possible leak in em28xx_init_isoc
    
    Coverity (CID 1929) spotted the following: if a transfer buffer
    allocation fails, the last allocated urb is leaked (it hasn't been
    stored in dev->urb[] yet so em28xx_uninit_isoc misses it). The patch
    also includes a small typo fix.
    
    Signed-off-by: Florin Malita <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/em28xx/em28xx-core.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/em28xx/em28xx-core.c 
b/drivers/media/video/em28xx/em28xx-core.c
index d3282ec..d56484f 100644
--- a/drivers/media/video/em28xx/em28xx-core.c
+++ b/drivers/media/video/em28xx/em28xx-core.c
@@ -648,7 +648,7 @@ void em28xx_uninit_isoc(struct em28xx *dev)
  */
 int em28xx_init_isoc(struct em28xx *dev)
 {
-       /* change interface to 3 which allowes the biggest packet sizes */
+       /* change interface to 3 which allows the biggest packet sizes */
        int i, errCode;
        const int sb_size = EM28XX_NUM_PACKETS * dev->max_pkt_size;
 
@@ -673,6 +673,7 @@ int em28xx_init_isoc(struct em28xx *dev)
                                        ("unable to allocate %i bytes for 
transfer buffer %i\n",
                                         sb_size, i);
                        em28xx_uninit_isoc(dev);
+                       usb_free_urb(urb);
                        return -ENOMEM;
                }
                memset(dev->transfer_buffer[i], 0, sb_size);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to