mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-02-04 06:08:26 +02:00
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…
x
Reference in New Issue
Block a user