[FFmpeg-trac] #9793(avfilter:new): Possible memory leak in libavfilter/af_channelsplit.c

FFmpeg trac at avcodec.org
Thu May 26 11:01:17 EEST 2022


#9793: Possible memory leak in libavfilter/af_channelsplit.c
-------------------------------------+-------------------------------------
             Reporter:  Matevos      |                     Type:  defect
  Mehrabyan                          |
               Status:  new          |                 Priority:  normal
            Component:  avfilter     |                  Version:  git-
             Keywords:  leak,        |  master
  memory leak                        |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 In 'init' function of libavfilter/af_channelsplit.c there is an execution
 path, which leads a memory leak.

 Execution path:
   On line 76 value of variable 'all' is set to 1.
   On line 94 memory is allocated for 'pad.name'.
   On line 101 an unimportant action is done.
   On line 115 the 'for' cycle is ended.
   On line 118 an unimportant action is done.
   On line 119 return from function.

 The only place where memory of 'pad.name' is deallocated is on line 106.
 But as the statement on line 101 is executed, then the statement on line
 106 will not be executed, because they are in opposite branches.

 Attaching git commit hash, so you can follow the lines described above:
 3c694967f862dc5e09921438c6cbd191944ac13c
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9793>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list