diff options
author | phintuka <phintuka> | 2010-01-03 21:56:10 +0000 |
---|---|---|
committer | phintuka <phintuka> | 2010-01-03 21:56:10 +0000 |
commit | a57ad0f84fcde6f051db2d383f4d950869b094dd (patch) | |
tree | 69c387c4eadf966a5c979a25a28bfc8a714f6d3c | |
parent | 89c3c88dc0e5193a6c24c97b3353e46d7f0fd5fe (diff) | |
download | xineliboutput-a57ad0f84fcde6f051db2d383f4d950869b094dd.tar.gz xineliboutput-a57ad0f84fcde6f051db2d383f4d950869b094dd.tar.bz2 |
Fixed segfault in fe_xine_exit() when this->postplugins == NULL
-rw-r--r-- | xine_frontend.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/xine_frontend.c b/xine_frontend.c index abff77db..c35ade21 100644 --- a/xine_frontend.c +++ b/xine_frontend.c @@ -4,7 +4,7 @@ * See the main source file 'xineliboutput.c' for copyright information and * how to reach the author. * - * $Id: xine_frontend.c,v 1.107 2010-01-03 21:51:49 phintuka Exp $ + * $Id: xine_frontend.c,v 1.108 2010-01-03 21:56:10 phintuka Exp $ * */ @@ -1202,9 +1202,15 @@ static void fe_xine_exit(frontend_t *this_gen) xine_dispose(this->stream); this->stream = NULL; - if(this->postplugins->pip_stream) - xine_dispose(this->postplugins->pip_stream); - this->postplugins->pip_stream = NULL; + if (this->postplugins) { + if (this->postplugins->pip_stream) + xine_dispose(this->postplugins->pip_stream); + this->postplugins->pip_stream = NULL; + + free(this->postplugins->static_post_plugins); + } + free(this->postplugins); + this->postplugins = NULL; if(this->slave_stream) xine_dispose(this->slave_stream); @@ -1220,11 +1226,6 @@ static void fe_xine_exit(frontend_t *this_gen) xine_close_video_driver(this->xine, this->video_port); this->video_port = NULL; - if(this->postplugins->static_post_plugins) - free(this->postplugins->static_post_plugins); - free(this->postplugins); - this->postplugins = NULL; - xine_exit(this->xine); this->xine = NULL; } |