purge auth_info when IKE_SA is established, releases cert memory

This commit is contained in:
Martin Willi
2008-12-09 14:34:15 +00:00
parent a1466a3ec2
commit 7023d49ee1
3 changed files with 22 additions and 2 deletions
+6
View File
@@ -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;
}