]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
fix to run longer in out of memory conditions
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 31 May 2010 12:46:24 +0000 (12:46 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Mon, 31 May 2010 12:46:24 +0000 (12:46 +0000)
git-svn-id: file:///svn/unbound/trunk@2121 be551aaa-1e26-0410-a405-d3ace91eadb9

doc/Changelog
util/alloc.c

index 240e25814ae19a64d05f013457eb8be6f1b0df96..a9c23af675edf0b43c9dd60b4dfa247a8a1093bc 100644 (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.
index 62cbec04b423a2b1962d648e68d6999d28b68d1e..49fa4f3433e2e8f2f717d6eb6efe30cb4ca4e906 100644 (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;