apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Poirier <poir...@pobox.com>
Subject Re: svn commit: r800733 - in /apr/apr/branches/0.9.x: CHANGES memory/unix/apr_pools.c
Date Fri, 14 Aug 2009 13:51:46 GMT
wrowe@apache.org writes:

> @@ -625,13 +629,19 @@
>   * Memory allocation
>   */
>  
> -APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t size)
> +APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t in_size)
>  {
>      apr_memnode_t *active, *node;
>      void *mem;
>      apr_uint32_t free_index;
> +    apr_size_t size;
>  
> -    size = APR_ALIGN_DEFAULT(size);
> +    size = APR_ALIGN_DEFAULT(in_size);
> +    if (size < in_size) {
> +        if (pool->abort_fn)
> +            pool->abort_fn(APR_ENOMEM);
> +
> +    }
>      active = pool->active;
>  
>      /* If the active node has enough bytes left, use it. */

Should this case be returning NULL as in the other branches?

-- 
Dan Poirier <poirier@pobox.com>

Mime
View raw message