aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/mpegts.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2006-04-01 18:19:00 +0000
committerMåns Rullgård <mans@mansr.com>2006-04-01 18:19:00 +0000
commit00a6b92bdd0618f74a7389b443a7862eb6750c1b (patch)
tree1d4c986146a2bd7f8987204f0739a648332c42c3 /libavformat/mpegts.c
parent54009d4295b20b3e0f5ba259f3cf1c5070974574 (diff)
downloadffmpeg-00a6b92bdd0618f74a7389b443a7862eb6750c1b.tar.gz
fix memory leak on mpegts close
found by Andy Brown <abrown at daqtron com> Originally committed as revision 5259 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mpegts.c')
-rw-r--r--libavformat/mpegts.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavformat/mpegts.c b/libavformat/mpegts.c
index 2804b95203..09cb116207 100644
--- a/libavformat/mpegts.c
+++ b/libavformat/mpegts.c
@@ -1374,6 +1374,14 @@ static int mpegts_read_close(AVFormatContext *s)
int i;
for(i=0;i<NB_PID_MAX;i++)
if (ts->pids[i]) mpegts_close_filter(ts, ts->pids[i]);
+
+ for(i = 0; i < ts->nb_services; i++){
+ av_free(ts->services[i]->provider_name);
+ av_free(ts->services[i]->name);
+ av_free(ts->services[i]);
+ }
+ av_freep(&ts->services);
+
return 0;
}