[libbluray-devel] mpls: fix leak (PiP metadata)

hpi1 git at videolan.org
Tue Aug 9 12:56:14 CEST 2016


libbluray | branch: master | hpi1 <hpi1 at anonymous.org> | Mon Aug  8 22:36:01 2016 +0300| [35bfbd1f0a7fb8f93abc7026f35d62564c1b6515] | committer: hpi1

mpls: fix leak (PiP metadata)

> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=35bfbd1f0a7fb8f93abc7026f35d62564c1b6515
---

 src/libbluray/bdnav/mpls_parse.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/libbluray/bdnav/mpls_parse.c b/src/libbluray/bdnav/mpls_parse.c
index 62dc243..15786e2 100644
--- a/src/libbluray/bdnav/mpls_parse.c
+++ b/src/libbluray/bdnav/mpls_parse.c
@@ -730,6 +730,11 @@ _parse_playlist(BITSTREAM *bits, MPLS_PL *pl)
     return 1;
 }
 
+static void _clean_pip_data(MPLS_PIP_METADATA *p)
+{
+    X_FREE(p->data);
+}
+
 static void
 _clean_playlist(MPLS_PL *pl)
 {
@@ -756,6 +761,13 @@ _clean_playlist(MPLS_PL *pl)
         }
         X_FREE(pl->ext_sub_path);
     }
+    if (pl->ext_pip_data != NULL) {
+        for (ii = 0; ii < pl->ext_pip_data_count; ii++) {
+            _clean_pip_data(&pl->ext_pip_data[ii]);
+        }
+        X_FREE(pl->ext_pip_data);
+    }
+
     X_FREE(pl->play_mark);
     X_FREE(pl);
 }



More information about the libbluray-devel mailing list