diff mbox series

[FFmpeg-devel,05/13] avcodec/vp9: Use av_freep() instead of av_free()

Message ID AM7PR03MB6660DE277129F3293F7661EE8FCE9@AM7PR03MB6660.eurprd03.prod.outlook.com
State Accepted
Commit b0ee627ef9344a2606834806bdc8c64630495d07
Headers show
Series [FFmpeg-devel,01/13] avcodec/vp9: Do not destroy uninitialized mutexes/conditions
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 fail Make fate failed
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Andreas Rheinhardt Sept. 2, 2021, 3:41 p.m. UTC
Otherwise the context would be in an inconsistent state
if vp9_alloc_entries() failed (and if this would be checked).

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vp9.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul B Mahol Sept. 2, 2021, 4:36 p.m. UTC | #1
LGTM
diff mbox series

Patch

diff --git a/libavcodec/vp9.c b/libavcodec/vp9.c
index 8eb57eb8e6..8bdcb86625 100644
--- a/libavcodec/vp9.c
+++ b/libavcodec/vp9.c
@@ -790,7 +790,7 @@  static int decode_frame_header(AVCodecContext *avctx,
         if (s->td) {
             for (i = 0; i < s->active_tile_cols; i++)
                 vp9_tile_data_free(&s->td[i]);
-            av_free(s->td);
+            av_freep(&s->td);
         }
 
         s->s.h.tiling.tile_cols = 1 << s->s.h.tiling.log2_tile_cols;