mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-28 20:53:54 +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:
parent
0e09067261
commit
84f716ccff
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user