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:
62ecd36
)
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
Mans Rullgard
<mans@mansr.com>
Thu, 3 Feb 2011 01:36:00 +0000
(
01:36
+0000)
Signed-off-by: Mans Rullgard <mans@mansr.com>
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
}