purge auth_info when IKE_SA is established, releases cert memory
This commit is contained in:
@@ -709,6 +709,12 @@ static void set_state(private_ike_sa_t *this, ike_sa_state_t state)
|
||||
break;
|
||||
}
|
||||
charon->bus->ike_state_change(charon->bus, &this->public, state);
|
||||
if (state == IKE_ESTABLISHED)
|
||||
{ /* purge auth items after hook invocation, as they contain certs
|
||||
* and other memory wasting elements */
|
||||
this->my_auth->purge(this->my_auth);
|
||||
this->other_auth->purge(this->other_auth);
|
||||
}
|
||||
this->state = state;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user