mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
Avoid pointless check before calling free
Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit dc75d6dbf2af3c03b33d3159e1dadccf22c076ea)
This commit is contained in:
parent
cf96cce728
commit
0c8eb72ec5
@ -138,9 +138,8 @@ void *av_realloc(void *ptr, FF_INTERNAL_MEM_TYPE size)
|
|||||||
|
|
||||||
void av_free(void *ptr)
|
void av_free(void *ptr)
|
||||||
{
|
{
|
||||||
/* XXX: this test should not be needed on most libcs */
|
|
||||||
if (ptr)
|
|
||||||
#if CONFIG_MEMALIGN_HACK
|
#if CONFIG_MEMALIGN_HACK
|
||||||
|
if (ptr)
|
||||||
free((char*)ptr - ((char*)ptr)[-1]);
|
free((char*)ptr - ((char*)ptr)[-1]);
|
||||||
#else
|
#else
|
||||||
free(ptr);
|
free(ptr);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user