History

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

Marvin Scholz committed 2 years ago

Commit 75543461 parent 6ec6b071 file · +1 −0Browse files

Showing the changes to libavdevice/decklink_dec.cpp (1 of 1 file). Show all

Unified · Split

libavdevice/decklink_dec.cpp+1−0
@@ -1098,6 +1098,7 @@ av_cold int ff_decklink_read_header(AVFormatContext *avctx) · 1097 unmodified lines
1098 }1098 }
1099 if (!ctx->draw_bars && ctx->signal_loss_action != SIGNAL_LOSS_NONE) {1099 if (!ctx->draw_bars && ctx->signal_loss_action != SIGNAL_LOSS_NONE) {
1100 av_log(avctx, AV_LOG_ERROR, "options draw_bars and signal_loss_action are mutually exclusive\n");1100 av_log(avctx, AV_LOG_ERROR, "options draw_bars and signal_loss_action are mutually exclusive\n");
1101 av_freep(&ctx);
1101 return AVERROR(EINVAL);1102 return AVERROR(EINVAL);
1102 }1103 }
1103 ctx->audio_depth = cctx->audio_depth;1104 ctx->audio_depth = cctx->audio_depth;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t