diff options
author | Marvin Scholz <epirat07@gmail.com> | 2024-09-12 04:52:43 +0200 |
---|---|---|
committer | Marton Balint <cus@passwd.hu> | 2024-09-29 10:12:41 +0200 |
commit | 7554346cb5cf6e8863da12f9d56e300b08d6cc23 (patch) | |
tree | ad9d147fcc0dbcb1ceb818183877db48151989f8 /libavdevice | |
parent | 6ec6b0790021c5871016f57ac33d54bb6cab7a7d (diff) | |
download | ffmpeg-7554346cb5cf6e8863da12f9d56e300b08d6cc23.tar.gz |
avdevice/decklink_dec: fix leak on error
In the early return when both draw_bars and signal_loss_action
options are used, the context allocated previously was not
properly freed.
Introduced in 9bcb86b0fa58f1a5a2a8613065349e26abadb329
Fixes CID1619296
Signed-off-by: Marton Balint <cus@passwd.hu>
Diffstat (limited to 'libavdevice')
-rw-r--r-- | libavdevice/decklink_dec.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavdevice/decklink_dec.cpp b/libavdevice/decklink_dec.cpp index 54d698bc12..9a817daf18 100644 --- a/libavdevice/decklink_dec.cpp +++ b/libavdevice/decklink_dec.cpp @@ -1098,6 +1098,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) } if (!ctx->draw_bars && ctx->signal_loss_action != SIGNAL_LOSS_NONE) { av_log(avctx, AV_LOG_ERROR, "options draw_bars and signal_loss_action are mutually exclusive\n"); + av_freep(&ctx); return AVERROR(EINVAL); } ctx->audio_depth = cctx->audio_depth; |