mirror of
https://github.com/monero-project/monero.git
synced 2025-05-20 20:30:22 -04:00
update unbound from upstream
This commit is contained in:
parent
b0151de601
commit
1f49833d4f
155 changed files with 5482 additions and 3440 deletions
9
external/unbound/services/cache/rrset.c
vendored
9
external/unbound/services/cache/rrset.c
vendored
|
@ -40,7 +40,7 @@
|
|||
*/
|
||||
#include "config.h"
|
||||
#include "services/cache/rrset.h"
|
||||
#include "ldns/rrdef.h"
|
||||
#include "sldns/rrdef.h"
|
||||
#include "util/storage/slabhash.h"
|
||||
#include "util/config_file.h"
|
||||
#include "util/data/packed_rrset.h"
|
||||
|
@ -304,10 +304,11 @@ rrset_array_unlock_touch(struct rrset_cache* r, struct regional* scratch,
|
|||
{
|
||||
hashvalue_t* h;
|
||||
size_t i;
|
||||
if(!(h = (hashvalue_t*)regional_alloc(scratch,
|
||||
sizeof(hashvalue_t)*count)))
|
||||
if(count > RR_COUNT_MAX || !(h = (hashvalue_t*)regional_alloc(scratch,
|
||||
sizeof(hashvalue_t)*count))) {
|
||||
log_warn("rrset LRU: memory allocation failed");
|
||||
else /* store hash values */
|
||||
h = NULL;
|
||||
} else /* store hash values */
|
||||
for(i=0; i<count; i++)
|
||||
h[i] = ref[i].key->entry.hash;
|
||||
/* unlock */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue