From 265731f201f1dde0dfe2448ad21d8256c17a33e2 Mon Sep 17 00:00:00 2001 From: Lynne Date: Sat, 29 Jan 2022 00:52:53 +0100 Subject: [PATCH] lavu/tx: reset subcontext pointer if initialization fails Thanks to mkver for pointing this out. --- libavutil/tx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavutil/tx.c b/libavutil/tx.c index a299408ed4..a90ccffcc4 100644 --- a/libavutil/tx.c +++ b/libavutil/tx.c @@ -606,7 +606,7 @@ av_cold int ff_tx_init_subtx(AVTXContext *s, enum AVTXType type, break; } - av_free(sub); + av_freep(&s->sub); end: av_free(cd_matches);