[FFmpeg-devel] lavf/dashdec: Fix memleak

jacek jogo overx300 at gmail.com
Wed Aug 1 13:03:52 EEST 2018


Hi.
This fix memleak in dashdec.
==5033== HEAP SUMMARY:
==5033==     in use at exit: 86,144 bytes in 2,848 blocks
==5033==   total heap usage: 10,089 allocs, 7,241 frees, 38,902,613 bytes
allocated
==5033==
==5033== Searching for pointers to 2,848 not-freed blocks
==5033== Checked 9,139,304 bytes
==5033==
==5033== 528 bytes in 8 blocks are definitely lost in loss record 187 of 222
==5033==    at 0x4C2CB5F: malloc (vg_replace_malloc.c:299)
==5033==    by 0x6868D38: xmlBufCreateSize (in /usr/lib64/libxml2.so.2.9.8)
==5033==    by 0x67F1029: xmlNodeGetContent (in /usr/lib64/libxml2.so.2.9.8)
==5033==    by 0x41EA43: resolve_content_path (dashdec.c:757)
==5033==    by 0x41EA43: parse_manifest_representation (dashdec.c:873)
==5033==    by 0x41EA43: parse_manifest_adaptationset (dashdec.c:1095)
==5033==    by 0x41EA43: parse_manifest (dashdec.c:1272)
==5033==    by 0x420E2A: dash_read_header (dashdec.c:1927)
==5033==    by 0x53CF77: avformat_open_input (utils.c:631)
==5033==    by 0x2647F4: open_input_file (ffmpeg_opt.c:1069)
==5033==    by 0x266121: open_files (ffmpeg_opt.c:3219)
==5033==    by 0x266121: ffmpeg_parse_options (ffmpeg_opt.c:3259)
==5033==    by 0x25E991: main (ffmpeg.c:4859)
==5033==
==5033== LEAK SUMMARY:
==5033==    definitely lost: 528 bytes in 8 blocks
==5033==    indirectly lost: 0 bytes in 0 blocks
==5033==      possibly lost: 0 bytes in 0 blocks
==5033==    still reachable: 85,616 bytes in 2,840 blocks
==5033==         suppressed: 0 bytes in 0 blocks
==5033== Reachable blocks (those to which a pointer was found) are not
shown.
==5033== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==5033==
==5033== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
==5033== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Can be reproduced with:  valgrind  --leak-check=full  -v ffmpeg -i
http://yt-dash-mse-test.commondatastorage.googleapis.com/media/motion-20120802-manifest.mpd
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-lavf-dashdec-Fix-memleak.patch
Type: text/x-patch
Size: 872 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20180801/074a43a5/attachment.bin>


More information about the ffmpeg-devel mailing list