[FFmpeg-trac] #8302(undetermined:new): memory leaks in avi_add_ientry()

FFmpeg trac at avcodec.org
Fri Oct 18 07:29:41 EEST 2019


#8302: memory leaks in avi_add_ientry()
-------------------------------------+-------------------------------------
             Reporter:  Suhwan       |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:               |                  Version:  git-
  undetermined                       |  master
             Keywords:               |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 Summary of the bug:
 There are memory leaks in avi_add_ientry()
 How to reproduce:
 {{{
 % ffmpeg_g -y -i $PoC -filter_complex buffersink -c copy tmp.avi

 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

 {{{
 ==16010== HEAP SUMMARY:
 ==16010==     in use at exit: 262,184 bytes in 3 blocks
 ==16010==   total heap usage: 252 allocs, 249 frees, 2,009,670 bytes
 allocated
 ==16010==
 ==16010== 262,152 (8 direct, 262,144 indirect) bytes in 1 blocks are
 definitely lost in loss record 3 of 3
 ==16010==    at 0x9FE0A3F: malloc (in /usr/lib/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==16010==    by 0x9FE2D84: realloc (in /usr/lib/valgrind
 /vgpreload_memcheck-amd64-linux.so)
 ==16010==    by 0x592E631: av_realloc (mem.c:144)
 ==16010==    by 0x592E631: av_realloc_f (mem.c:157)
 ==16010==    by 0x146737C: avi_add_ientry (avienc.c:117)
 ==16010==    by 0x1466ABB: avi_write_packet_internal (avienc.c:893)
 ==16010==    by 0x146226F: avi_write_packet (avienc.c:853)
 ==16010==    by 0x17E6344: write_packet (mux.c:747)
 ==16010==    by 0x17ECD05: av_interleaved_write_frame (mux.c:1238)
 ==16010==    by 0x4B5DEA: write_packet (ffmpeg.c:815)
 ==16010==    by 0x4A3F70: do_streamcopy (ffmpeg.c:0)
 ==16010==    by 0x4A3F70: process_input_packet (ffmpeg.c:2736)
 ==16010==    by 0x4BF0EF: process_input (ffmpeg.c:4508)
 ==16010==    by 0x48D5EA: transcode_step (ffmpeg.c:4628)
 ==16010==    by 0x48D5EA: transcode (ffmpeg.c:4682)
 ==16010==
 ==16010== LEAK SUMMARY:
 ==16010==    definitely lost: 8 bytes in 1 blocks
 ==16010==    indirectly lost: 262,144 bytes in 1 blocks
 ==16010==      possibly lost: 0 bytes in 0 blocks
 ==16010==    still reachable: 32 bytes in 1 blocks
 ==16010==         suppressed: 0 bytes in 0 blocks
 ==16010== Reachable blocks (those to which a pointer was found) are not
 shown.
 ==16010== To see them, rerun with: --leak-check=full --show-leak-kinds=all
 ==16010==
 ==16010== For counts of detected and suppressed errors, rerun with: -v
 ==16010== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)
 }}}
 Please confirm.
 Thanks

--
Ticket URL: <https://trac.ffmpeg.org/ticket/8302>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list