Commit dc75d6db authored by Clément Bœsch's avatar Clément Bœsch Committed by Mans Rullgard

Avoid pointless check before calling free

Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent 62ecd363
......@@ -138,12 +138,11 @@ 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);
free(ptr);
#endif
}
......
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