1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

avcodec/vp9: Don't free buffer known to be NULL

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
Andreas Rheinhardt
2021-09-02 13:35:49 +02:00
parent 0e09067261
commit 84f716ccff

View File

@@ -62,11 +62,8 @@ static int vp9_alloc_entries(AVCodecContext *avctx, int n) {
av_freep(&s->entries);
s->entries = av_malloc_array(n, sizeof(atomic_int));
if (!s->entries) {
av_freep(&s->entries);
if (!s->entries)
return AVERROR(ENOMEM);
}
for (i = 0; i < n; i++)
atomic_init(&s->entries[i], 0);