fix to run longer in out of memory conditions

git-svn-id: file:///svn/unbound/trunk@2121 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2010-05-31 12:46:24 +00:00
parent 6ef058f9b0
commit 66b24c3cb2
2 changed files with 6 additions and 2 deletions

View file

@ -1,6 +1,8 @@
31 May 2010: Wouter
- Fix AD flag handling, it could in some cases mistakenly copy the AD
flag from upstream servers.
- alloc_special_obtain out of memory is not a fatal error any more,
enabling unbound to continue longer in out of memory conditions.
28 May 2010: Wouter
- iana portlist updated.

View file

@ -217,8 +217,10 @@ alloc_special_obtain(struct alloc_cache* alloc)
}
/* allocate new */
prealloc(alloc);
if(!(p = (alloc_special_t*)malloc(sizeof(alloc_special_t))))
fatal_exit("alloc_special_obtain: out of memory");
if(!(p = (alloc_special_t*)malloc(sizeof(alloc_special_t)))) {
log_err("alloc_special_obtain: out of memory");
return NULL;
}
alloc_setup_special(p);
p->id = alloc_get_id(alloc);
return p;