diff options
author | softworkz <softworkz@hotmail.com> | 2025-05-20 03:12:33 +0200 |
---|---|---|
committer | softworkz <softworkz@hotmail.com> | 2025-05-28 01:02:55 +0200 |
commit | a0ac89e46c705f763e2aadd353c33f65c9c8042b (patch) | |
tree | 9a829980f47189183028365e5d7853112d6e8dd3 /fftools/graph/graphprint.c | |
parent | 75a5e0959f5855ae50385e948cbd9fd13f0acf85 (diff) | |
download | ffmpeg-a0ac89e46c705f763e2aadd353c33f65c9c8042b.tar.gz |
fftools/graphprint: Fix memory leaks
- uninit resource manager
- free strings before overwriting
- unref hw_frames_context
Signed-off-by: softworkz <softworkz@hotmail.com>
Diffstat (limited to 'fftools/graph/graphprint.c')
-rw-r--r-- | fftools/graph/graphprint.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/fftools/graph/graphprint.c b/fftools/graph/graphprint.c index 50f1a2ecdc..852a8f6c0c 100644 --- a/fftools/graph/graphprint.c +++ b/fftools/graph/graphprint.c @@ -318,6 +318,7 @@ static void print_link(GraphPrintContext *gpc, AVFilterLink *link) if (hw_frames_ctx && 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) @@ -1107,5 +1108,7 @@ cleanup: 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; } |