OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cf96cce
)
Avoid pointless check before calling free
author
Clément Bœsch
<ubitux@gmail.com>
Thu, 3 Feb 2011 00:40:35 +0000
(
01:40
+0100)
committer
Michael Niedermayer
<michaelni@gmx.at>
Fri, 4 Feb 2011 02:10:10 +0000
(
03:10
+0100)
Signed-off-by: Mans Rullgard <mans@mansr.com>
(cherry picked from commit
dc75d6dbf2af3c03b33d3159e1dadccf22c076ea
)
libavutil/mem.c
patch
|
blob
|
history
diff --git
a/libavutil/mem.c
b/libavutil/mem.c
index
18fe28b
..
7ffd6cb
100644
(file)
--- 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
}