Remove test against NULL before freeing memory
authorAdrian Grange <agrange@google.com>
Wed, 23 Apr 2014 21:02:27 +0000 (14:02 -0700)
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>
Thu, 24 Apr 2014 16:32:40 +0000 (09:32 -0700)
Change-Id: I6ce6395b74019345c8b7242d874761f981ad53af

vpx_scale/generic/yv12config.c

index 5e95d31e0663662f9795d7cb2d7751a5aca2a07a..3eaf50ed7db6638507a851b760ded9a934975f8b 100644 (file)
@@ -183,8 +183,7 @@ int vp9_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
       ybf->buffer_alloc = (uint8_t *)yv12_align_addr(fb->data, 32);
     } else if (frame_size > ybf->buffer_alloc_sz) {
       // Allocation to hold larger frame, or first allocation.
-      if (ybf->buffer_alloc)
-        vpx_free(ybf->buffer_alloc);
+      vpx_free(ybf->buffer_alloc);
       ybf->buffer_alloc = (uint8_t *)vpx_memalign(32, frame_size);
       if (!ybf->buffer_alloc)
         return -1;