summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEwald Snel <esnel@users.sourceforge.net>2002-12-21 13:45:56 +0000
committerEwald Snel <esnel@users.sourceforge.net>2002-12-21 13:45:56 +0000
commitadfc59f8f04d83123795ce39731cc05a78b7b78d (patch)
tree49e9140c6a376e0afeeb5e0478308445ca4dc147
parent5f31761a4fa6995592cdd536c52f6ddac8151a89 (diff)
downloadxine-lib-adfc59f8f04d83123795ce39731cc05a78b7b78d.tar.gz
xine-lib-adfc59f8f04d83123795ce39731cc05a78b7b78d.tar.bz2
Fix memory leaks
CVS patchset: 3604 CVS date: 2002/12/21 13:45:56
-rw-r--r--src/demuxers/demux_qt.c8
-rw-r--r--src/input/input_net.c15
2 files changed, 18 insertions, 5 deletions
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index 9f7b64512..55507ef1d 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.132 2002/12/21 12:56:45 miguelfreitas Exp $
+ * $Id: demux_qt.c,v 1.133 2002/12/21 13:45:56 esnel Exp $
*
*/
@@ -537,6 +537,7 @@ qt_info *create_qt_info(void) {
info->audio_vbr = 0;
info->audio_decoder_config = NULL;
info->audio_decoder_config_len = 0;
+ info->audio_stsd = NULL;
info->video_codec = 0;
info->video_type = 0;
@@ -545,6 +546,7 @@ qt_info *create_qt_info(void) {
info->video_depth = 0;
info->video_decoder_config = NULL;
info->video_decoder_config_len = 0;
+ info->video_stsd = NULL;
info->frames = NULL;
info->frame_count = 0;
@@ -570,6 +572,8 @@ void free_qt_info(qt_info *info) {
free(info->audio_decoder_config);
if(info->video_decoder_config)
free(info->video_decoder_config);
+ free(info->audio_stsd);
+ free(info->video_stsd);
free(info->copyright);
free(info->description);
free(info->comment);
@@ -673,6 +677,7 @@ static qt_error parse_trak_atom (qt_sample_table *sample_table,
sample_table->frames = NULL;
sample_table->decoder_config = NULL;
sample_table->decoder_config_len = 0;
+ sample_table->stsd = NULL;
/* special audio parameters */
sample_table->samples_per_packet = 0;
@@ -1224,6 +1229,7 @@ free_sample_table:
free(sample_table->sample_to_chunk_table);
free(sample_table->time_to_sample_table);
free(sample_table->decoder_config);
+ free(sample_table->stsd);
return last_error;
}
diff --git a/src/input/input_net.c b/src/input/input_net.c
index 0903e2a98..e4e9bee0f 100644
--- a/src/input/input_net.c
+++ b/src/input/input_net.c
@@ -20,7 +20,7 @@
* Read from a tcp network stream over a lan (put a tweaked mp1e encoder the
* other end and you can watch tv anywhere in the house ..)
*
- * $Id: input_net.c,v 1.39 2002/12/21 12:56:47 miguelfreitas Exp $
+ * $Id: input_net.c,v 1.40 2002/12/21 13:45:57 esnel Exp $
*
* how to set up mp1e for use with this plugin:
*
@@ -328,12 +328,17 @@ static input_plugin_t *net_plugin_open (input_class_t *cls_gen, xine_stream_t *s
if (!strncasecmp (mrl, "tcp://", 6)) {
filename = (char *) &this->mrl[6];
- if((!filename) || (strlen(filename) == 0))
+ if((!filename) || (strlen(filename) == 0)) {
+ free (this->mrl);
+ free (this);
return NULL;
+ }
- }
- else
+ } else {
+ free (this->mrl);
+ free (this);
return NULL;
+ }
pptr=strrchr(filename, ':');
if(pptr) {
@@ -345,6 +350,8 @@ static input_plugin_t *net_plugin_open (input_class_t *cls_gen, xine_stream_t *s
this->curpos = 0;
if (this->fh == -1) {
+ free (this->mrl);
+ free (this);
return NULL;
}