mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-01-02 21:09:35 -05:00
- Fix memory leak when caching wildcard records for aggressive NSEC use
git-svn-id: file:///svn/unbound/trunk@4662 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
2c9d9fe211
commit
d97a635084
2 changed files with 5 additions and 0 deletions
|
|
@ -1,3 +1,6 @@
|
|||
25 April 2018: Ralph
|
||||
- Fix memory leak when caching wildcard records for aggressive NSEC use
|
||||
|
||||
24 April 2018: Wouter
|
||||
- Fix contrib/fastrpz.patch for this release.
|
||||
- Fix auth https for libev.
|
||||
|
|
|
|||
2
services/cache/rrset.c
vendored
2
services/cache/rrset.c
vendored
|
|
@ -255,9 +255,11 @@ void rrset_cache_update_wildcard(struct rrset_cache* rrset_cache,
|
|||
wc_dname[1] = (uint8_t)'*';
|
||||
memmove(wc_dname+2, ce, ce_len);
|
||||
|
||||
free(rrset->rk.dname);
|
||||
rrset->rk.dname_len = ce_len + 2;
|
||||
rrset->rk.dname = (uint8_t*)memdup(wc_dname, rrset->rk.dname_len);
|
||||
if(!rrset->rk.dname) {
|
||||
alloc_special_release(alloc, rrset);
|
||||
log_err("memdup failure in rrset_cache_update_wildcard");
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue