1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Check return value of posix_memalign and explicitly set pointer to NULL if it

fails, patch by Patrik Kullman, patrik yes nu.

Originally committed as revision 17495 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Patrik Kullman 2009-02-21 20:38:27 +00:00 committed by Diego Biurrun
parent 1bbeb06a36
commit a90de11dba

View File

@ -63,7 +63,8 @@ void *av_malloc(unsigned int size)
ptr = (char*)ptr + diff; ptr = (char*)ptr + diff;
((char*)ptr)[-1]= diff; ((char*)ptr)[-1]= diff;
#elif HAVE_POSIX_MEMALIGN #elif HAVE_POSIX_MEMALIGN
posix_memalign(&ptr,16,size); if (posix_memalign(&ptr,16,size))
ptr = NULL;
#elif HAVE_MEMALIGN #elif HAVE_MEMALIGN
ptr = memalign(16,size); ptr = memalign(16,size);
/* Why 64? /* Why 64?