summaryrefslogtreecommitdiff
path: root/vpx_scale/generic/yv12config.c
diff options
context:
space:
mode:
authorAdrian Grange <agrange@google.com>2014-04-23 14:02:27 -0700
committerGerrit Code Review <gerrit@gerrit.golo.chromium.org>2014-04-24 09:32:40 -0700
commitb933205a0281ed8830017a96f70402bc3dcffb11 (patch)
treeb661f10051560b671cd0ee33cab65afc5fbeedaa /vpx_scale/generic/yv12config.c
parent1aa2d1a44409dfb6e02f1a5fe8f0f0a04fbcdc9f (diff)
downloadlibvpx-b933205a0281ed8830017a96f70402bc3dcffb11.tar
libvpx-b933205a0281ed8830017a96f70402bc3dcffb11.tar.gz
libvpx-b933205a0281ed8830017a96f70402bc3dcffb11.tar.bz2
libvpx-b933205a0281ed8830017a96f70402bc3dcffb11.zip
Remove test against NULL before freeing memory
Change-Id: I6ce6395b74019345c8b7242d874761f981ad53af
Diffstat (limited to 'vpx_scale/generic/yv12config.c')
-rw-r--r--vpx_scale/generic/yv12config.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/vpx_scale/generic/yv12config.c b/vpx_scale/generic/yv12config.c
index 5e95d31e0..3eaf50ed7 100644
--- a/vpx_scale/generic/yv12config.c
+++ b/vpx_scale/generic/yv12config.c
@@ -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;