Commit 665df1fa authored by michaelni's avatar michaelni

print a warning if something allocates 0 bytes


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@1307 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 8f29ff1c
......@@ -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