diff options
author | Johannes Stezenbach <devnull@localhost> | 2005-03-13 23:30:36 +0000 |
---|---|---|
committer | Johannes Stezenbach <devnull@localhost> | 2005-03-13 23:30:36 +0000 |
commit | f18e8baa8f48b863a59ff81c8795c317d49f4fb8 (patch) | |
tree | cabf247617b828be36edd6172a8103e58e5f9dc8 /linux/drivers/media/dvb | |
parent | 29bb043b6465d9cce17ca3eb1dd8cb59a48a3cc1 (diff) | |
download | mediapointer-dvb-s2-f18e8baa8f48b863a59ff81c8795c317d49f4fb8.tar.gz mediapointer-dvb-s2-f18e8baa8f48b863a59ff81c8795c317d49f4fb8.tar.bz2 |
dmxdev.c vfree() checking cleanups.
Signed-off by: James Lamanna <jlamanna@gmail.com>
Signed-off-by: Domen Puncer <domen@coderock.org>
Diffstat (limited to 'linux/drivers/media/dvb')
-rw-r--r-- | linux/drivers/media/dvb/dvb-core/dmxdev.c | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.c b/linux/drivers/media/dvb/dvb-core/dmxdev.c index 7d26f91e9..1863f1dfb 100644 --- a/linux/drivers/media/dvb/dvb-core/dmxdev.c +++ b/linux/drivers/media/dvb/dvb-core/dmxdev.c @@ -304,8 +304,7 @@ static int dvb_dmxdev_set_buffer_size(struct dmxdev_filter *dmxdevfilter, unsign buf->size=size; buf->pwrite=buf->pread=0; spin_unlock_irq(&dmxdevfilter->dev->lock); - if (mem) - vfree(mem); + vfree(mem); if (buf->size) { mem=vmalloc(dmxdevfilter->buffer.size); @@ -1129,15 +1128,10 @@ dvb_dmxdev_release(struct dmxdev *dmxdev) dvb_unregister_device(dmxdev->dvbdev); dvb_unregister_device(dmxdev->dvr_dvbdev); - if (dmxdev->filter) { - vfree(dmxdev->filter); - dmxdev->filter=NULL; - } - - if (dmxdev->dvr) { - vfree(dmxdev->dvr); - dmxdev->dvr=NULL; - } + vfree(dmxdev->filter); + dmxdev->filter=NULL; + vfree(dmxdev->dvr); + dmxdev->dvr=NULL; dmxdev->demux->close(dmxdev->demux); } EXPORT_SYMBOL(dvb_dmxdev_release); |