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
1 changed files with 1 additions and 4 deletions

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);