Commit:     a04036a3129e09a9b9097de2b1f77dd82a6e9ac3
Parent:     89a47942f0facc4664d982005ac03d8dcb9635c1
Author:     Trent Piepho <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 5 11:28:09 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Mon Oct 22 12:01:43 2007 -0200

    V4L/DVB (6336): cx8802: Plug memory leak when unregistering a driver
    When a cx8802 sub-driver was unregistered, the struct cx8802_driver, which 
    kmalloc()ed by cx8802_register_driver(), was deleted from the list of 
    but never freed.
    Signed-off-by: Trent Piepho <[EMAIL PROTECTED]>
    Reviewed-by: Michael Krufky <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
 drivers/media/video/cx88/cx88-mpeg.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/cx88/cx88-mpeg.c 
index d4858e4..448c673 100644
--- a/drivers/media/video/cx88/cx88-mpeg.c
+++ b/drivers/media/video/cx88/cx88-mpeg.c
@@ -735,6 +735,7 @@ int cx8802_unregister_driver(struct cx8802_driver *drv)
+                               kfree(d);
                        } else
                                printk(KERN_ERR "%s/2: cx8802 driver remove "
                                       "failed (%d)\n", dev->core->name, err);
@@ -817,6 +818,7 @@ static void __devexit cx8802_remove(struct pci_dev *pci_dev)
                        } else
                                printk(KERN_ERR "%s/2: cx8802 driver remove "
                                       "failed (%d)\n", dev->core->name, err);
+                       kfree(drv);
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

Reply via email to