From f05739485150466c58cacf0491a56eeda2906ea5 Mon Sep 17 00:00:00 2001 From: voroshil Date: Mon, 5 Nov 2007 16:33:29 +0000 Subject: Fix segmentation fault after audio initialization failure in tv driver. Error was caused by double call to driver's uninit() routine. git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@24971 b3059339-0415-0410-9bf9-f77b7e298cf2 --- stream/tv.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'stream') diff --git a/stream/tv.c b/stream/tv.c index a026bfc6c8..c58f415161 100644 --- a/stream/tv.c +++ b/stream/tv.c @@ -617,7 +617,10 @@ static int tv_uninit(tvi_handle_t *tvh) if(!tvh) return 1; if (!tvh->priv) return 1; res=tvh->functions->uninit(tvh->priv); - if(res) tvh->priv=NULL; + if(res) { + free(tvh->priv); + tvh->priv=NULL; + } return res; } @@ -784,7 +787,7 @@ static void demux_close_tv(demuxer_t *demuxer) { tvi_handle_t *tvh=(tvi_handle_t*)(demuxer->priv); if (!tvh) return; - tvh->functions->uninit(tvh->priv); + tv_uninit(tvh); demuxer->priv=NULL; } -- cgit v1.2.3