#10342(ffmpeg:new): memory leak in fftools/ffmpeg_opt.c file's opt_map_channel function
#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
#10342: memory leak in fftools/ffmpeg_opt.c file's opt_map_channel function -------------------------------------+----------------------------------- Reporter: Hripsime | Owner: (none) Type: defect | Status: closed Priority: important | Component: ffmpeg Version: git-master | Resolution: invalid Keywords: memory leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Changes (by Cigaes): * analyzed: 1 => 0 * status: new => closed * resolution: => invalid * reproduced: 1 => 0 Comment: Exiting without freeing all memory is not a leak. All the memory is freed by the operating system. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10342#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10342: memory leak in fftools/ffmpeg_opt.c file's opt_map_channel function -------------------------------------+----------------------------------- Reporter: Hripsime | Owner: (none) Type: defect | Status: closed Priority: important | Component: ffmpeg Version: git-master | Resolution: invalid Keywords: memory leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+----------------------------------- Comment (by Balling):
All the memory is freed by the operating system.
*modern operating system. And anyway, GPU memory will not be, handles will not be closed, even files opened will not be closed. And of course it makes closing slower, sonce OS will still check the state before closing the threads. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10342#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10342: memory leak in fftools/ffmpeg_opt.c file's opt_map_channel function -------------------------------------+------------------------------------ Reporter: Hripsime | Owner: (none) Type: defect | Status: reopened Priority: important | Component: ffmpeg Version: git-master | Resolution: Keywords: memory leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+------------------------------------ Changes (by quinkblack): * status: closed => reopened * resolution: invalid => Comment: It's important to cleanup resources manually so we can detect if there is any memleak in our libs. Should be fixed by http://ffmpeg.org/pipermail/ffmpeg- devel/2023-May/309209.html -- Ticket URL: <https://trac.ffmpeg.org/ticket/10342#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10342: memory leak in fftools/ffmpeg_opt.c file's opt_map_channel function -------------------------------------+---------------------------------- Reporter: Hripsime | Owner: (none) Type: defect | Status: closed Priority: important | Component: ffmpeg Version: git-master | Resolution: fixed Keywords: memory leak | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | -------------------------------------+---------------------------------- Changes (by mkver): * resolution: => fixed * status: reopened => closed Comment: Fixed in 2654347d7adba61ab8a8cce470d657958f6f00f9. (And the whole affected code was later removed in e48055fdceceab3aed09b0f82299bc3fbbb94b54.) -- Ticket URL: <https://trac.ffmpeg.org/ticket/10342#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg