提交 5b20b732 编写于 作者: M Michael Niedermayer

print a warning if something allocates 0 bytes

Originally committed as revision 1307 to svn://svn.ffmpeg.org/ffmpeg/trunk
上级 b92be2af
......@@ -23,6 +23,9 @@
void *av_mallocz(unsigned int size)
{
void *ptr;
if(size == 0) fprintf(stderr, "Warning, allocating 0 bytes\n");
ptr = av_malloc(size);
if (!ptr)
return NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册