]> granicus.if.org Git - libvpx/commitdiff
vp9_decoder: free postproc_state.prev_mip
authorJames Zern <jzern@google.com>
Tue, 19 May 2020 23:41:54 +0000 (16:41 -0700)
committerJames Zern <jzern@google.com>
Tue, 19 May 2020 23:41:54 +0000 (16:41 -0700)
this fixes a leak when using MFQE

BUG=webm:1692

Change-Id: I19fb2f07155769f59924e0843989b3d3f8899bf6

vp9/decoder/vp9_decoder.c

index bcade52c4e4eec5e34d2f6b65925d6bac97c5b54..7db8ed72d5114e29229faff3aa2cf8d39481c0a5 100644 (file)
@@ -153,6 +153,11 @@ static int vp9_dec_alloc_mi(VP9_COMMON *cm, int mi_size) {
 }
 
 static void vp9_dec_free_mi(VP9_COMMON *cm) {
+#if CONFIG_VP9_POSTPROC
+  // MFQE allocates an additional mip and swaps it with cm->mip.
+  vpx_free(cm->postproc_state.prev_mip);
+  cm->postproc_state.prev_mip = NULL;
+#endif
   vpx_free(cm->mip);
   cm->mip = NULL;
   vpx_free(cm->mi_grid_base);