[libbluray-devel] Fixed memory leak in mpls parsing
Ferdinand Holzer
git at videolan.org
Fri Aug 17 12:53:23 CEST 2012
libbluray | branch: master | Ferdinand Holzer <holzer at grg21.ac.at> | Sun May 27 21:42:51 2012 +0200| [9abc8544d598b4478c56eef3badf057128cc2ea0] | committer: hpi1
Fixed memory leak in mpls parsing
audio_ref's weren't freed in _clean_stn.
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=9abc8544d598b4478c56eef3badf057128cc2ea0
---
ChangeLog | 1 +
src/libbluray/bdnav/mpls_parse.c | 8 ++++++++
2 files changed, 9 insertions(+)
diff --git a/ChangeLog b/ChangeLog
index b65d310..9df6f6c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+ - Fixed memory leaks
- Automatic language selection: disable subtitles when audio is in the same language
- Fixed accessing outside of array bounds
- Default to stream 0 when requested language not found
diff --git a/src/libbluray/bdnav/mpls_parse.c b/src/libbluray/bdnav/mpls_parse.c
index 5c83532..d868452 100644
--- a/src/libbluray/bdnav/mpls_parse.c
+++ b/src/libbluray/bdnav/mpls_parse.c
@@ -401,6 +401,14 @@ _parse_stn(BITSTREAM *bits, MPLS_STN *stn)
static void
_clean_stn(MPLS_STN *stn)
{
+ if(stn->secondary_audio) {
+ X_FREE(stn->secondary_audio->sa_primary_audio_ref);
+ }
+ if(stn->secondary_video) {
+ X_FREE(stn->secondary_video->sv_secondary_audio_ref);
+ X_FREE(stn->secondary_video->sv_pip_pg_ref);
+ }
+
X_FREE(stn->video);
X_FREE(stn->audio);
X_FREE(stn->pg);
More information about the libbluray-devel
mailing list