git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bbeb06
)
Check return value of posix_memalign and explicitly set pointer to NULL if it
author
Patrik Kullman
<patrik@yes.nu>
Sat, 21 Feb 2009 20:38:27 +0000
(20:38 +0000)
committer
Diego Biurrun
<diego@biurrun.de>
Sat, 21 Feb 2009 20:38:27 +0000
(20:38 +0000)
fails, patch by Patrik Kullman, patrik yes nu.
Originally committed as revision 17495 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavutil/mem.c
patch
|
blob
|
history
diff --git
a/libavutil/mem.c
b/libavutil/mem.c
index
f21e918
..
741450b
100644
(file)
--- a/
libavutil/mem.c
+++ b/
libavutil/mem.c
@@
-63,7
+63,8
@@
void *av_malloc(unsigned int size)
ptr = (char*)ptr + diff;
((char*)ptr)[-1]= diff;
#elif HAVE_POSIX_MEMALIGN
- posix_memalign(&ptr,16,size);
+ if (posix_memalign(&ptr,16,size))
+ ptr = NULL;
#elif HAVE_MEMALIGN
ptr = memalign(16,size);
/* Why 64?