mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
truemotion2: Use av_freep properly in an error path
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind CC: libav-stable@libav.org Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
f875a732e3
commit
c39f7eba01
@ -929,14 +929,14 @@ static av_cold int decode_init(AVCodecContext *avctx)
|
|||||||
if (!l->Y1_base || !l->Y2_base || !l->U1_base ||
|
if (!l->Y1_base || !l->Y2_base || !l->U1_base ||
|
||||||
!l->V1_base || !l->U2_base || !l->V2_base ||
|
!l->V1_base || !l->U2_base || !l->V2_base ||
|
||||||
!l->last || !l->clast) {
|
!l->last || !l->clast) {
|
||||||
av_freep(l->Y1_base);
|
av_freep(&l->Y1_base);
|
||||||
av_freep(l->Y2_base);
|
av_freep(&l->Y2_base);
|
||||||
av_freep(l->U1_base);
|
av_freep(&l->U1_base);
|
||||||
av_freep(l->U2_base);
|
av_freep(&l->U2_base);
|
||||||
av_freep(l->V1_base);
|
av_freep(&l->V1_base);
|
||||||
av_freep(l->V2_base);
|
av_freep(&l->V2_base);
|
||||||
av_freep(l->last);
|
av_freep(&l->last);
|
||||||
av_freep(l->clast);
|
av_freep(&l->clast);
|
||||||
return AVERROR(ENOMEM);
|
return AVERROR(ENOMEM);
|
||||||
}
|
}
|
||||||
l->Y1 = l->Y1_base + l->y_stride * 4 + 4;
|
l->Y1 = l->Y1_base + l->y_stride * 4 + 4;
|
||||||
|
Loading…
Reference in New Issue
Block a user