summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2011-02-03 01:40:35 +0100
committerMichael Niedermayer <michaelni@gmx.at>2011-02-04 03:10:10 +0100
commit0c8eb72ec5183909d87d8bba5c3b17337635c02a (patch)
treed17685d877a1f0d0d9525e8480f05204e8456974
parentcf96cce728fdc83a6ebf98997ebf90c3c2ec2052 (diff)
downloadffmpeg-streaming-0c8eb72ec5183909d87d8bba5c3b17337635c02a.zip
ffmpeg-streaming-0c8eb72ec5183909d87d8bba5c3b17337635c02a.tar.gz
Avoid pointless check before calling free
Signed-off-by: Mans Rullgard <mans@mansr.com> (cherry picked from commit dc75d6dbf2af3c03b33d3159e1dadccf22c076ea)
-rw-r--r--libavutil/mem.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libavutil/mem.c b/libavutil/mem.c
index 18fe28b..7ffd6cb 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -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
}
OpenPOWER on IntegriCloud