Skip to content

Add missing free for mpls static metadata

Lennart Austenfeld requested to merge l.austenfeld/libbluray:master into master

The ext_static_metadata attribute of the MPLS_PL type is not freed when calling mpls_free.

Valgrind memcheck stacktrace:

==753371== 26 bytes in 1 blocks are definitely lost in loss record 2 of 10
==753371==    at 0x4840B65: calloc (vg_replace_malloc.c:760)
==753371==    by 0x4862A76: _parse_static_metadata_extension (mpls_parse.c:1038)
==753371==    by 0x4862A76: _parse_mpls_extension (mpls_parse.c:1085)
==753371==    by 0x485FF1E: bdmv_parse_extension_data (extdata_parse.c:63)
==753371==    by 0x4863792: _mpls_parse (mpls_parse.c:1125)
==753371==    by 0x4864653: mpls_parse (mpls_parse.c:1146)
==753371==    by 0x10AF10: _process_file (mpls_dump.c:545)
==753371==    by 0x10A39D: main (mpls_dump.c:779)

This commit simply adds a call to X_FREE(pl->ext_static_metadata); in the _clean_playlist function.

Merge request reports