Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=f40a29168475d64d854ef16a9263b24b0b2a9c6e
Commit:     f40a29168475d64d854ef16a9263b24b0b2a9c6e
Parent:     6773c1c24d48f0aa667ba2aff573904a77050f09
Author:     Hans Verkuil <[EMAIL PROTECTED]>
AuthorDate: Sat Mar 10 20:50:51 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Fri Apr 27 15:44:33 2007 -0300

    V4L/DVB (5417): First unregister the driver, and then free the memory.
    
    ivtv_remove which is called by pci_unregister_driver was still using
    memory that was already freed. Ouch.
    
    Signed-off-by: Hans Verkuil <[EMAIL PROTECTED]>
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/ivtv/ivtv-driver.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/ivtv/ivtv-driver.c 
b/drivers/media/video/ivtv/ivtv-driver.c
index 7058aa2..d00811a 100644
--- a/drivers/media/video/ivtv/ivtv-driver.c
+++ b/drivers/media/video/ivtv/ivtv-driver.c
@@ -1345,6 +1345,8 @@ static void module_cleanup(void)
 {
        int i, j;
 
+       pci_unregister_driver(&ivtv_pci_driver);
+
        for (i = 0; i < ivtv_cards_active; i++) {
                if (ivtv_cards[i] == NULL)
                        continue;
@@ -1353,7 +1355,6 @@ static void module_cleanup(void)
                }
                kfree(ivtv_cards[i]);
        }
-       pci_unregister_driver(&ivtv_pci_driver);
 }
 
 /* Note: These symbols are exported because they are used by the ivtv-fb
-
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