[libav-commits] mem: Don't abort on av_malloc(0) in debug mode

Martin Storsjö git at libav.org
Tue Jul 10 10:37:11 CEST 2012


Module: libav
Branch: master
Commit: 620b1e7e989e71825858c621fa96a7e0a742d239

Author:    Martin Storsjö <martin at martin.st>
Committer: Martin Storsjö <martin at martin.st>
Date:      Wed Apr 11 10:33:43 2012 +0300

mem: Don't abort on av_malloc(0) in debug mode

This makes the behaviour consistent between debug and release mode.

Signed-off-by: Martin Storsjö <martin at martin.st>

---

 libavutil/mem.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/libavutil/mem.c b/libavutil/mem.c
index 0fe9f54..3769da7 100644
--- a/libavutil/mem.c
+++ b/libavutil/mem.c
@@ -68,8 +68,6 @@ void *av_malloc(size_t size)
     long diff;
 #endif
 
-    assert(size);
-
     /* let's disallow possible ambiguous cases */
     if (size > (INT_MAX-32) || !size)
         return NULL;



More information about the libav-commits mailing list