summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorGerd Knorr <devnull@localhost>2004-12-02 14:23:54 +0000
committerGerd Knorr <devnull@localhost>2004-12-02 14:23:54 +0000
commite1cbf7915c2b64872018b2407f4d1887b93065e2 (patch)
treeb78a22d84b3b8d48ccfb7c751a96ff4f4c6816e2 /linux/drivers
parentd390d2b04ddcd1d70bf5ae89e677ad03bd680e90 (diff)
downloadmediapointer-dvb-s2-e1cbf7915c2b64872018b2407f4d1887b93065e2.tar.gz
mediapointer-dvb-s2-e1cbf7915c2b64872018b2407f4d1887b93065e2.tar.bz2
- fix memory leak in drivers.
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/bttv-driver.c5
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c3
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c4
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-empress.c3
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c5
-rw-r--r--linux/drivers/media/video/video-buf.c3
6 files changed, 17 insertions, 6 deletions
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index bbaa84e12..1f389d33a 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-driver.c,v 1.30 2004/11/19 18:07:12 kraxel Exp $
+ $Id: bttv-driver.c,v 1.31 2004/12/02 14:23:54 kraxel Exp $
bttv - Bt848 frame grabber driver
@@ -2996,6 +2996,9 @@ static int bttv_release(struct inode *inode, struct file *file)
free_btres(btv,fh,RESOURCE_VBI);
}
+ /* free stuff */
+ videobuf_mmap_free(&fh->cap);
+ videobuf_mmap_free(&fh->vbi);
v4l2_prio_close(&btv->prio,&fh->prio);
file->private_data = NULL;
kfree(fh);
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index a76e3a79b..ecc32b6fb 100644
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-blackbird.c,v 1.20 2004/12/02 13:44:44 kraxel Exp $
+ * $Id: cx88-blackbird.c,v 1.21 2004/12/02 14:23:54 kraxel Exp $
*
* Support for a cx23416 mpeg encoder via cx2388x host port.
* "blackbird" reference design.
@@ -716,6 +716,7 @@ static int mpeg_release(struct inode *inode, struct file *file)
if (fh->mpegq.reading)
videobuf_read_stop(&fh->mpegq);
+ videobuf_mmap_free(&fh->mpegq);
file->private_data = NULL;
kfree(fh);
return 0;
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 24a575543..1671f8616 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-video.c,v 1.48 2004/11/30 17:00:13 kraxel Exp $
+ * $Id: cx88-video.c,v 1.49 2004/12/02 14:23:54 kraxel Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -1090,6 +1090,8 @@ static int video_release(struct inode *inode, struct file *file)
res_free(dev,fh,RESOURCE_VBI);
}
+ videobuf_mmap_free(&fh->vidq);
+ videobuf_mmap_free(&fh->vbiq);
file->private_data = NULL;
kfree(fh);
return 0;
diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c
index c74f1ee01..08c2d58a0 100644
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-empress.c,v 1.7 2004/11/19 18:07:12 kraxel Exp $
+ * $Id: saa7134-empress.c,v 1.8 2004/12/02 14:23:54 kraxel Exp $
*
* (c) 2004 Gerd Knorr <kraxel@bytesex.org> [SuSE Labs]
*
@@ -118,6 +118,7 @@ static int ts_release(struct inode *inode, struct file *file)
down(&dev->empress_tsq.lock);
if (dev->empress_tsq.reading)
videobuf_read_stop(&dev->empress_tsq);
+ videobuf_mmap_free(&dev->empress_tsq);
dev->empress_users--;
/* stop the encoder */
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 8faafa1d2..36a623fca 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: saa7134-video.c,v 1.22 2004/11/19 18:07:12 kraxel Exp $
+ * $Id: saa7134-video.c,v 1.23 2004/12/02 14:23:54 kraxel Exp $
*
* device driver for philips saa7134 based TV cards
* video4linux video interface
@@ -1358,6 +1358,9 @@ static int video_release(struct inode *inode, struct file *file)
res_free(dev,fh,RESOURCE_VBI);
}
+ /* free stuff */
+ videobuf_mmap_free(&fh->cap);
+ videobuf_mmap_free(&fh->vbi);
saa7134_pgtable_free(dev->pci,&fh->pt_cap);
saa7134_pgtable_free(dev->pci,&fh->pt_vbi);
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index 5e1608f13..33740d57b 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -1,5 +1,5 @@
/*
- * $Id: video-buf.c,v 1.15 2004/11/07 14:45:00 kraxel Exp $
+ * $Id: video-buf.c,v 1.16 2004/12/02 14:23:54 kraxel Exp $
*
* generic helper functions for video4linux capture buffers, to handle
* memory management and PCI DMA. Right now bttv + saa7134 use it.
@@ -902,6 +902,7 @@ void videobuf_read_stop(struct videobuf_queue *q)
int i;
videobuf_queue_cancel(q);
+ videobuf_mmap_free(q);
INIT_LIST_HEAD(&q->stream);
for (i = 0; i < VIDEO_MAX_FRAME; i++) {
if (NULL == q->bufs[i])