diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-02-03 01:40:35 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-02-04 03:10:10 +0100 |
commit | 0c8eb72ec5183909d87d8bba5c3b17337635c02a (patch) | |
tree | d17685d877a1f0d0d9525e8480f05204e8456974 | |
parent | cf96cce728fdc83a6ebf98997ebf90c3c2ec2052 (diff) | |
download | ffmpeg-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.c | 5 |
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 } |