1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Avoid pointless check before calling free

Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
Clément Bœsch 2011-02-03 01:40:35 +01:00 committed by Mans Rullgard
parent 62ecd3635a
commit dc75d6dbf2

View File

@ -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
}