shithub: libvpx

Download patch

ref: b933205a0281ed8830017a96f70402bc3dcffb11
parent: 1aa2d1a44409dfb6e02f1a5fe8f0f0a04fbcdc9f
author: Adrian Grange <agrange@google.com>
date: Wed Apr 23 10:02:27 EDT 2014

Remove test against NULL before freeing memory

Change-Id: I6ce6395b74019345c8b7242d874761f981ad53af

--- a/vpx_scale/generic/yv12config.c
+++ b/vpx_scale/generic/yv12config.c
@@ -183,8 +183,7 @@
       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;