1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-04 22:03:09 +02:00

avcodec/svq1enc: Don't free scratchbuf upon error

Forgotten in 65015003f5c4b83a8202abfa7420ccf37cde6ce3;
after said commit, freeing scratchbuf on error in svq1_encode_frame()
could lead to segfaults lateron, because the buffer will not
be allocated again.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2025-06-12 21:28:03 +02:00
parent 109bf099d5
commit 1fe08d629a

View File

@ -681,7 +681,6 @@ static int svq1_encode_frame(AVCodecContext *avctx, AVPacket *pkt,
av_freep(&s->motion_val8[j]);
av_freep(&s->motion_val16[j]);
}
av_freep(&s->scratchbuf);
return -1;
}
}