aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-02 13:35:49 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-09-04 08:03:19 +0200
commit84f716ccffbcb15fd272b5678bae6b82e59a95cd (patch)
treeb7c3d4dd7862262ab673d44821d09bd9345641cb /libavcodec
parent0e0906726133519c59a2234162df66f53d755de0 (diff)
downloadffmpeg-84f716ccffbcb15fd272b5678bae6b82e59a95cd.tar.gz
avcodec/vp9: Don't free buffer known to be NULL
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp9.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 239475cdbe..8eb57eb8e6 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -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);