diff options
author | Ewald Snel <esnel@users.sourceforge.net> | 2002-04-23 13:30:42 +0000 |
---|---|---|
committer | Ewald Snel <esnel@users.sourceforge.net> | 2002-04-23 13:30:42 +0000 |
commit | 2238f0536fa7bb4ad6d59ff38ed040dc4d81ff64 (patch) | |
tree | 41c61dbec58d9c610019cf4dade18416c6076d91 /src/input/input_cda.c | |
parent | 8cab88a56f0c9fcaa14ea197ad8a95c58024abfc (diff) | |
download | xine-lib-2238f0536fa7bb4ad6d59ff38ed040dc4d81ff64.tar.gz xine-lib-2238f0536fa7bb4ad6d59ff38ed040dc4d81ff64.tar.bz2 |
Fix memory leaks by disposing input, demux and decoder plugins at exit
- add dispose() function to all decoder plugin structures
CVS patchset: 1763
CVS date: 2002/04/23 13:30:42
Diffstat (limited to 'src/input/input_cda.c')
-rw-r--r-- | src/input/input_cda.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/input/input_cda.c b/src/input/input_cda.c index bdf2a881b..fb7defe66 100644 --- a/src/input/input_cda.c +++ b/src/input/input_cda.c @@ -17,7 +17,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA * - * $Id: input_cda.c,v 1.19 2002/04/11 22:27:11 jcdutton Exp $ + * $Id: input_cda.c,v 1.20 2002/04/23 13:30:42 esnel Exp $ */ #ifdef HAVE_CONFIG_H @@ -1768,6 +1768,19 @@ static int cda_plugin_get_optional_data (input_plugin_t *this_gen, void *data, i return INPUT_OPTIONAL_UNSUPPORTED; } +static int cda_plugin_dispose (input_plugin_t *this_gen ) { + cda_input_plugin_t *this = (cda_input_plugin_t *) this_gen; + int i; + + for (i = 0; i < 100; i++) + free (this->filelist[i]); + + free (this->cda->device_name); + free (this->cda); + free (this->mrls); + free (this); +} + /* * Initialize plugin. */ @@ -1813,6 +1826,7 @@ input_plugin_t *init_input_plugin (int iface, xine_t *xine) { this->input_plugin.get_mrl = cda_plugin_get_mrl; this->input_plugin.get_autoplay_list = cda_plugin_get_autoplay_list; this->input_plugin.get_optional_data = cda_plugin_get_optional_data; + this->input_plugin.dispose = cda_plugin_dispose; this->input_plugin.is_branch_possible = NULL; this->xine = xine; |