Opened 5 years ago

Closed 5 years ago

#8304 closed defect (fixed)

memory leaks in config_input()

Reported by: Suhwan Owned by:
Priority: important Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:
There are memory leaks in config_input()
How to reproduce:

% ffmpeg_g -y -i $PoC -filter_complex acrossover -loglevel 0 -psnr -vbsf filter_units tmp.au

ffmpeg version N-95441-g0ae6fb276b Copyright (c) 2000-2019 the FFmpeg developers
built with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
configuration: --cc=clang --cxx=clang++ --ld=clang --enable-debug

Here's Valgrind log

==30118== HEAP SUMMARY:
==30118==     in use at exit: 19,616 bytes in 2 blocks
==30118==   total heap usage: 1,879 allocs, 1,877 frees, 5,173,265 bytes allocated
==30118== 
==30118== 19,584 bytes in 1 blocks are definitely lost in loss record 2 of 2
==30118==    at 0x9FE2E76: memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30118==    by 0x9FE2F91: posix_memalign (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30118==    by 0x592EB79: av_malloc (mem.c:87)
==30118==    by 0x592EB79: av_mallocz (mem.c:238)
==30118==    by 0x592EB79: av_calloc (mem.c:248)
==30118==    by 0x1005FD2: config_input (af_acrossover.c:170)
==30118==    by 0x5C6FD9: avfilter_config_links (avfilter.c:369)
==30118==    by 0x5C5EBB: avfilter_config_links (avfilter.c:307)
==30118==    by 0x5C5EBB: avfilter_config_links (avfilter.c:307)
==30118==    by 0x5C5EBB: avfilter_config_links (avfilter.c:307)
==30118==    by 0x5D8871: graph_config_links (avfiltergraph.c:261)
==30118==    by 0x5D8871: avfilter_graph_config (avfiltergraph.c:1279)
==30118==    by 0x46A51E: configure_filtergraph (ffmpeg_filter.c:1109)
==30118==    by 0x4CAD14: ifilter_send_frame (ffmpeg.c:2179)
==30118==    by 0x4CAD14: send_frame_to_filters (ffmpeg.c:2260)
==30118==    by 0x49BA80: decode_audio (ffmpeg.c:2327)
==30118==    by 0x49BA80: process_input_packet (ffmpeg.c:2609)
==30118== 
==30118== LEAK SUMMARY:
==30118==    definitely lost: 19,584 bytes in 1 blocks
==30118==    indirectly lost: 0 bytes in 0 blocks
==30118==      possibly lost: 0 bytes in 0 blocks
==30118==    still reachable: 32 bytes in 1 blocks
==30118==         suppressed: 0 bytes in 0 blocks
==30118== Reachable blocks (those to which a pointer was found) are not shown.
==30118== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==30118== 
==30118== For counts of detected and suppressed errors, rerun with: -v
==30118== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Please confirm.
Thanks

Attachments (1)

PoC_con.ogg (41.8 KB ) - added by Suhwan 5 years ago.
poc

Download all attachments as: .zip

Change History (2)

by Suhwan, 5 years ago

Attachment: PoC_con.ogg added

poc

comment:1 by Elon Musk, 5 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.