apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: svn commit: r1402907 - /apr/apr/trunk/buckets/apr_buckets_alloc.c
Date Mon, 05 Nov 2012 16:34:18 GMT

On Nov 5, 2012, at 11:11 AM, Ruediger Pluem <rpluem@apache.org> wrote:

>> 
>> -    if (apr_allocator_create(&allocator) != APR_SUCCESS) {
>> -        abort();
>> +    if (apr_allocator_create(&allocator) != APR_SUCCESS
>> +        || (list = apr_bucket_alloc_create_ex(allocator)) == NULL) {
>> +        apr_abortfunc_t fn = apr_pool_abort_get(p);
>> +        if (fn)
>> +            (fn)(APR_ENOMEM);
> 
> Are we sure that fn never returns? If it does list further down below is not initialized
and further things could go
> wrong. Shouldn't we return NULL here to be save?
> 

+1
Mime
View raw message