shithub: libvpx

Download patch

ref: 47cc64cdf89562c549b3b7b27b8a99947f23f045
parent: fbf256da41db9624e6a3392da0ba6e8778335ad3
author: JackyChen <[email protected]>
date: Tue Jul 26 13:25:03 EDT 2016

vp9 denoiser: Derefencing pointer should be after null check.

BUG=webm:1267

Change-Id: I899fc9e8d784c6eefcbe27945c619845adb7b6f0

--- a/vp9/encoder/vp9_denoiser.c
+++ b/vp9/encoder/vp9_denoiser.c
@@ -575,10 +575,10 @@
 
 void vp9_denoiser_free(VP9_DENOISER *denoiser) {
   int i;
-  denoiser->frame_buffer_initialized = 0;
   if (denoiser == NULL) {
     return;
   }
+  denoiser->frame_buffer_initialized = 0;
   for (i = 0; i < MAX_REF_FRAMES; ++i) {
     vpx_free_frame_buffer(&denoiser->running_avg_y[i]);
   }