mirror of
https://github.com/xenia-project/FFmpeg.git
synced 2024-11-24 12:09:55 +00:00
avcodec/dirac: Fix memleak of dsh on error
Fixes CID1351360 Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
020b75806f
commit
43a6965569
@ -349,8 +349,10 @@ int av_dirac_parse_sequence_header(AVDiracSeqHeader **pdsh,
|
||||
else if (dsh->version.major > 2 && log_ctx)
|
||||
av_log(log_ctx, AV_LOG_WARNING, "Stream may have unhandled features\n");
|
||||
|
||||
if (video_format > 20U)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (video_format > 20U) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
/* Fill in defaults for the source parameters. */
|
||||
dsh->width = dirac_source_parameters_defaults[video_format].width;
|
||||
|
Loading…
Reference in New Issue
Block a user