diff options
author | Clément Bœsch <ubitux@gmail.com> | 2011-02-03 01:40:35 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-02-03 01:36:00 +0000 |
commit | dc75d6dbf2af3c03b33d3159e1dadccf22c076ea (patch) | |
tree | d241fe58c55ffc32ad96c40e199ecf4a3b954c88 /libavutil/mem.c | |
parent | 62ecd3635a1329c49bc3b97ba84ad4d53d847163 (diff) | |
download | ffmpeg-dc75d6dbf2af3c03b33d3159e1dadccf22c076ea.tar.gz |
Avoid pointless check before calling free
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavutil/mem.c')
-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 18fe28b7ce..7ffd6cba9b 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 } |