[FFmpeg-trac] #10342(ffmpeg:new): memory leak in fftools/ffmpeg_opt.c file's opt_map_channel function

FFmpeg trac at avcodec.org
Tue May 2 16:42:23 EEST 2023


#10342: memory leak in fftools/ffmpeg_opt.c file's opt_map_channel function
-------------------------------------+-------------------------------------
             Reporter:  Hripsime     |                     Type:  defect
               Status:  new          |                 Priority:  important
            Component:  ffmpeg       |                  Version:  git-
                                     |  master
             Keywords:  memory leak  |               Blocked By:
             Blocking:               |  Reproduced by developer:  1
Analyzed by developer:  1            |
-------------------------------------+-------------------------------------
 The opt_map_channel function in the fftools/ffmpeg_opt.c source file
 appears to contain a memory leak. Specifically, memory is allocated using
 av_strdup() in line 472:

 mapchan = av_strdup(arg);

 However, the function contains multiple exit_program() calls that
 terminate the program without freeing the allocated memory in lines 507,
 513, 519, and 533.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/10342>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list