mirror of
https://github.com/NLnetLabs/unbound.git
synced 2026-02-02 19:59:28 -05:00
- Fix memory leak when reload_keep_cache is used and num-threads changes.
This commit is contained in:
parent
caab100207
commit
486985fbdf
1 changed files with 4 additions and 1 deletions
|
|
@ -503,7 +503,10 @@ daemon_clear_allocs(struct daemon* daemon)
|
|||
{
|
||||
int i;
|
||||
|
||||
for(i=0; i<daemon->num; i++) {
|
||||
/* daemon->num may be different during reloads (after configuration
|
||||
* read). Use old_num which has the correct value used to setup the
|
||||
* worker_allocs */
|
||||
for(i=0; i<daemon->old_num; i++) {
|
||||
alloc_clear(daemon->worker_allocs[i]);
|
||||
free(daemon->worker_allocs[i]);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue