mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-10-01 22:24:55 +02:00
Removed hard malloc failure reported by Greg Woods.
git-svn-id: file:///svn/unbound/trunk@1876 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
29 October 2009: Wouter
|
||||
- removed abort on prealloc failure, error still printed but softfail.
|
||||
|
||||
27 October 2009: Wouter
|
||||
- iana portlist updated.
|
||||
|
||||
|
||||
+8
-3
@@ -69,8 +69,10 @@ prealloc(struct alloc_cache* alloc)
|
||||
alloc_special_t* p;
|
||||
int i;
|
||||
for(i=0; i<ALLOC_SPECIAL_MAX; i++) {
|
||||
if(!(p = (alloc_special_t*)malloc(sizeof(alloc_special_t))))
|
||||
fatal_exit("prealloc: out of memory");
|
||||
if(!(p = (alloc_special_t*)malloc(sizeof(alloc_special_t)))) {
|
||||
log_err("prealloc: out of memory");
|
||||
return;
|
||||
}
|
||||
alloc_setup_special(p);
|
||||
alloc_set_special_next(p, alloc->quar);
|
||||
alloc->quar = p;
|
||||
@@ -86,7 +88,10 @@ prealloc_blocks(struct alloc_cache* alloc, size_t num)
|
||||
struct regional* r;
|
||||
for(i=0; i<num; i++) {
|
||||
r = regional_create_custom(ALLOC_REG_SIZE);
|
||||
if(!r) fatal_exit("prealloc blocks: out of memory");
|
||||
if(!r) {
|
||||
log_err("prealloc blocks: out of memory");
|
||||
return;
|
||||
}
|
||||
r->next = (char*)alloc->reg_list;
|
||||
alloc->reg_list = r;
|
||||
alloc->num_reg_blocks ++;
|
||||
|
||||
Reference in New Issue
Block a user