ike: Store unhandled attributes on IKE_SA as well

This commit is contained in:
Martin Willi
2014-06-16 15:59:16 +02:00
parent b16e177e06
commit 5ae3221075
4 changed files with 12 additions and 12 deletions
+5 -2
View File
@@ -2150,8 +2150,11 @@ METHOD(ike_sa_t, destroy, void,
/* remove attributes first, as we pass the IKE_SA to the handler */
while (array_remove(this->attributes, ARRAY_TAIL, &entry))
{
hydra->attributes->release(hydra->attributes, entry.handler,
this->other_id, entry.type, entry.data);
if (entry.handler)
{
hydra->attributes->release(hydra->attributes, entry.handler,
this->other_id, entry.type, entry.data);
}
free(entry.data.ptr);
}
/* uninstall CHILD_SAs before virtual IPs, otherwise we might kill