auth-cfg: Fix crash after several reauthentications with multiple authentication rounds
Due to the issue described in c641974
, purge() inadvertently destroyed
CA certificates that should have been kept (while the pointer to these
objects remained in the array). This lead to incorrect reference counts
and after a few reauthentications with multiple authentication rounds,
which cause calls to purge(TRUE), to crashes.
This commit is contained in:
parent
ea50394bf1
commit
8ca9a67fac
|
@ -998,8 +998,8 @@ METHOD(auth_cfg_t, purge, void,
|
||||||
{
|
{
|
||||||
if (!keep_ca || entry->type != AUTH_RULE_CA_CERT)
|
if (!keep_ca || entry->type != AUTH_RULE_CA_CERT)
|
||||||
{
|
{
|
||||||
array_remove_at(this->entries, enumerator);
|
|
||||||
destroy_entry_value(entry);
|
destroy_entry_value(entry);
|
||||||
|
array_remove_at(this->entries, enumerator);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
enumerator->destroy(enumerator);
|
enumerator->destroy(enumerator);
|
||||||
|
|
Loading…
Reference in New Issue