Commit 5b20b732 authored by Michael Niedermayer's avatar Michael Niedermayer

print a warning if something allocates 0 bytes

Originally committed as revision 1307 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 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% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment