We however have plenty of realloc calls without any checks. Cheers,
On Sun, Aug 7, 2011 at 3:50 PM, Antony Dovgal <t...@daylessday.org> wrote: > On 08/07/2011 05:19 PM, Xinchen Hui wrote: >> >> opts = (opt_struct *) erealloc(opts, sizeof(opt_struct) * >> (len + count + 1)); >> + if (!opts) { >> + RETURN_FALSE; >> + } >> + > > erealloc() cannot return NULL whatever happens and if you look at the > sources, you'll notice that nobody > ever checks the result of emalloc(), erealloc() or ecalloc(). > That's because Zend memory manager shuts down the whole process if it fails > to allocate a memory segment. > See Zend/zend_alloc.c for details. > > -- > Wbr, > Antony Dovgal > --- > http://pinba.org - realtime profiling for PHP > > -- > PHP CVS Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Pierre @pierrejoye | http://blog.thepimp.net | http://www.libgd.org -- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php