You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-04 22:03:09 +02:00
fftools/graphprint: Fix memory leaks
- uninit resource manager - free strings before overwriting - unref hw_frames_context Signed-off-by: softworkz <softworkz@hotmail.com>
This commit is contained in:
@ -318,6 +318,7 @@ static void print_link(GraphPrintContext *gpc, AVFilterLink *link)
|
|||||||
|
|
||||||
if (hw_frames_ctx && hw_frames_ctx->data)
|
if (hw_frames_ctx && hw_frames_ctx->data)
|
||||||
print_hwframescontext(gpc, (AVHWFramesContext *)hw_frames_ctx->data);
|
print_hwframescontext(gpc, (AVHWFramesContext *)hw_frames_ctx->data);
|
||||||
|
av_buffer_unref(&hw_frames_ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
static char sanitize_char(const char c)
|
static char sanitize_char(const char c)
|
||||||
@ -1107,5 +1108,7 @@ cleanup:
|
|||||||
|
|
||||||
int print_filtergraphs(FilterGraph **graphs, int nb_graphs, InputFile **ifiles, int nb_ifiles, OutputFile **ofiles, int nb_ofiles)
|
int print_filtergraphs(FilterGraph **graphs, int nb_graphs, InputFile **ifiles, int nb_ifiles, OutputFile **ofiles, int nb_ofiles)
|
||||||
{
|
{
|
||||||
return print_filtergraphs_priv(graphs, nb_graphs, ifiles, nb_ifiles, ofiles, nb_ofiles);
|
int ret = print_filtergraphs_priv(graphs, nb_graphs, ifiles, nb_ifiles, ofiles, nb_ofiles);
|
||||||
|
ff_resman_uninit();
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user