Commit 0c8eb72e authored by Clément Bœsch's avatar Clément Bœsch Committed by Michael Niedermayer

Avoid pointless check before calling free

Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
(cherry picked from commit dc75d6db)
parent cf96cce7
......@@ -138,9 +138,8 @@ void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size)
void av_free(void *ptr)
{
/* XXX: this test should not be needed on most libcs */
if (ptr)
#if CONFIG_MEMALIGN_HACK
if (ptr)
free((char*)ptr - ((char*)ptr)[-1]);
#else
free(ptr);
......
Markdown is supported
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