summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2007-03-11 00:50:51 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2007-03-11 00:50:51 +0100
commitd5364fa8ca72c1f58b72e545214aa03bb3c52184 (patch)
tree637f052185f841178d64d51da07f77f2847c8695
parentcb4e2d9fcdbff50678051ae43a23f9b11c0cbd53 (diff)
downloadmediapointer-dvb-s2-d5364fa8ca72c1f58b72e545214aa03bb3c52184.tar.gz
mediapointer-dvb-s2-d5364fa8ca72c1f58b72e545214aa03bb3c52184.tar.bz2
First unregister the driver, and then free the memory.
From: Hans Verkuil <hverkuil@xs4all.nl> ivtv_remove which is called by pci_unregister_driver was still using memory that was already freed. Ouch. Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
-rw-r--r--linux/drivers/media/video/ivtv/ivtv-driver.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-driver.c b/linux/drivers/media/video/ivtv/ivtv-driver.c
index be35fa43c..3da98f9c4 100644
--- a/linux/drivers/media/video/ivtv/ivtv-driver.c
+++ b/linux/drivers/media/video/ivtv/ivtv-driver.c
@@ -1349,6 +1349,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;
@@ -1357,7 +1359,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