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:
parent
4af02c6c61
commit
da1d5cd2e6
|
@ -235,6 +235,7 @@ METHOD(enumerator_t, child_cfgs_replace_enumerate, bool,
|
||||||
{
|
{
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
this->wrapped->destroy(this->wrapped);
|
||||||
this->wrapped = this->added->create_enumerator(this->added);
|
this->wrapped = this->added->create_enumerator(this->added);
|
||||||
this->add = TRUE;
|
this->add = TRUE;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue