vp9 denoiser: Derefencing pointer should be after null check.

BUG=webm:1267

Change-Id: I899fc9e8d784c6eefcbe27945c619845adb7b6f0
This commit is contained in:
JackyChen 2016-07-26 17:25:03 -07:00
parent fbf256da41
commit 47cc64cdf8

View File

@ -575,10 +575,10 @@ int vp9_denoiser_alloc(VP9_DENOISER *denoiser, int width, int height,
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]);
}