diff options
author | Ewald Snel <esnel@users.sourceforge.net> | 2002-06-19 16:33:00 +0000 |
---|---|---|
committer | Ewald Snel <esnel@users.sourceforge.net> | 2002-06-19 16:33:00 +0000 |
commit | deff4cff7d33cbcac98cc4d59b92489d415f9af3 (patch) | |
tree | 087adb2047c98f5aa7e70ae6f7b15f1cae2de845 | |
parent | c389b2579aa292afe0a8b9795c5cad58158e0e2b (diff) | |
download | xine-lib-deff4cff7d33cbcac98cc4d59b92489d415f9af3.tar.gz xine-lib-deff4cff7d33cbcac98cc4d59b92489d415f9af3.tar.bz2 |
Fix memory leaks and related bugs
CVS patchset: 2092
CVS date: 2002/06/19 16:33:00
-rw-r--r-- | src/demuxers/demux_film.c | 10 | ||||
-rw-r--r-- | src/demuxers/demux_qt.c | 4 | ||||
-rw-r--r-- | src/demuxers/demux_roq.c | 4 | ||||
-rw-r--r-- | src/libw32dll/Makefile.am | 1 |
4 files changed, 12 insertions, 7 deletions
diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c index 67b3db888..ccd60885a 100644 --- a/src/demuxers/demux_film.c +++ b/src/demuxers/demux_film.c @@ -21,7 +21,7 @@ * For more information on the FILM file format, visit: * http://www.pcisys.net/~melanson/codecs/ * - * $Id: demux_film.c,v 1.12 2002/06/16 00:53:39 jcdutton Exp $ + * $Id: demux_film.c,v 1.13 2002/06/19 16:33:00 esnel Exp $ */ #ifdef HAVE_CONFIG_H @@ -195,6 +195,8 @@ static int open_film_file(demux_film_t *film) case STAB_TAG: /* load the sample table */ + if (film->sample_table) + free(film->sample_table); film->frequency = BE_32(&film_header[i + 8]); film->sample_count = BE_32(&film_header[i + 12]); film->sample_table = @@ -704,9 +706,11 @@ static void demux_film_stop (demux_plugin_t *this_gen) { static void demux_film_close (demux_plugin_t *this_gen) { demux_film_t *this = (demux_film_t *) this_gen; - free(this->sample_table); - free(this); pthread_mutex_destroy (&this->mutex); + + if (this->sample_table) + free(this->sample_table); + free(this); } static int demux_film_get_status (demux_plugin_t *this_gen) { diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c index 32ebb8ee2..6cd0c8d24 100644 --- a/src/demuxers/demux_qt.c +++ b/src/demuxers/demux_qt.c @@ -30,7 +30,7 @@ * build_frame_table * free_qt_info * - * $Id: demux_qt.c,v 1.54 2002/06/18 06:45:51 tmmm Exp $ + * $Id: demux_qt.c,v 1.55 2002/06/19 16:33:00 esnel Exp $ * */ @@ -1449,8 +1449,8 @@ static void demux_qt_close (demux_plugin_t *this_gen) { demux_qt_t *this = (demux_qt_t *) this_gen; free_qt_info(this->qt); - free(this); pthread_mutex_destroy (&this->mutex); + free(this); } static int demux_qt_get_status (demux_plugin_t *this_gen) { diff --git a/src/demuxers/demux_roq.c b/src/demuxers/demux_roq.c index 5ddc91684..d5761162b 100644 --- a/src/demuxers/demux_roq.c +++ b/src/demuxers/demux_roq.c @@ -21,7 +21,7 @@ * For more information regarding the RoQ file format, visit: * http://www.csse.monash.edu.au/~timf/ * - * $Id: demux_roq.c,v 1.5 2002/06/12 12:22:33 f1rmb Exp $ + * $Id: demux_roq.c,v 1.6 2002/06/19 16:33:01 esnel Exp $ */ #ifdef HAVE_CONFIG_H @@ -506,7 +506,7 @@ static void demux_roq_stop (demux_plugin_t *this_gen) { } static void demux_roq_close (demux_plugin_t *this) { - + free(this); } static int demux_roq_get_status (demux_plugin_t *this_gen) { diff --git a/src/libw32dll/Makefile.am b/src/libw32dll/Makefile.am index e87a257c3..f9d3c6ff6 100644 --- a/src/libw32dll/Makefile.am +++ b/src/libw32dll/Makefile.am @@ -22,6 +22,7 @@ lib_LTLIBRARIES = $(w32dll_codec) xineplug_decode_w32dll_la_SOURCES = w32codec.c xineplug_decode_w32dll_la_LDFLAGS = -avoid-version -module xineplug_decode_w32dll_la_LIBADD = $(top_builddir)/src/libw32dll/wine/libwine.la \ + $(top_builddir)/src/xine-utils/libxineutils.la \ $(top_builddir)/src/libw32dll/DirectShow/libds_filter.la @KSTAT_LIBS@ noinst_HEADERS = w32codec.h libwin32.h |