diff utils.c @ 908:2ac4caad5ca6 libavcodec

print a warning if something allocates 0 bytes
author michaelni
date Wed, 04 Dec 2002 12:42:25 +0000
parents 22ee74da2cd3
children 3814e9115672
line wrap: on
line diff
--- a/utils.c	Wed Dec 04 12:36:18 2002 +0000
+++ b/utils.c	Wed Dec 04 12:42:25 2002 +0000
@@ -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;