mirror of https://git.ffmpeg.org/ffmpeg.git
print a warning if something allocates 0 bytes
Originally committed as revision 1307 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
b92be2af42
commit
5b20b7328a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue