Commit b933205a authored by Adrian Grange's avatar Adrian Grange Committed by Gerrit Code Review
Browse files

Remove test against NULL before freeing memory

Change-Id: I6ce6395b74019345c8b7242d874761f981ad53af
Showing with 1 addition and 2 deletions
...@@ -183,8 +183,7 @@ int vp9_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, ...@@ -183,8 +183,7 @@ int vp9_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
ybf->buffer_alloc = (uint8_t *)yv12_align_addr(fb->data, 32); ybf->buffer_alloc = (uint8_t *)yv12_align_addr(fb->data, 32);
} else if (frame_size > ybf->buffer_alloc_sz) { } else if (frame_size > ybf->buffer_alloc_sz) {
// Allocation to hold larger frame, or first allocation. // 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); ybf->buffer_alloc = (uint8_t *)vpx_memalign(32, frame_size);
if (!ybf->buffer_alloc) if (!ybf->buffer_alloc)
return -1; return -1;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment