1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/dnn_filter_common: fix memleak

Signed-off-by: Zhao Zhili <zhilizhao@tencent.com>
This commit is contained in:
Zhao Zhili 2023-09-02 16:23:52 +08:00 committed by Guo Yejun
parent c1b6235d41
commit 3e24a27765

View File

@ -159,4 +159,10 @@ void ff_dnn_uninit(DnnContext *ctx)
if (ctx->dnn_module) {
(ctx->dnn_module->free_model)(&ctx->model);
}
if (ctx->model_outputnames) {
for (int i = 0; i < ctx->nb_outputs; i++)
av_free(ctx->model_outputnames[i]);
av_freep(&ctx->model_outputnames);
}
}