peer-cfg: Fix memory leak when replacing child configs

Fixes: 622c2b2c33 ("peer-cfg: Add method to atomically replace child
configs")
This commit is contained in:
Tobias Brunner 2016-11-11 15:30:54 +01:00
parent 4af02c6c61
commit da1d5cd2e6
1 changed files with 1 additions and 0 deletions

View File

@ -235,6 +235,7 @@ METHOD(enumerator_t, child_cfgs_replace_enumerate, bool,
{
break;
}
this->wrapped->destroy(this->wrapped);
this->wrapped = this->added->create_enumerator(this->added);
this->add = TRUE;
}