diff options
author | Martin Willi <martin@strongswan.org> | 2007-03-05 22:02:14 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2007-03-05 22:02:14 +0000 |
commit | 02b3101b670dca4b6e83ce41cf28afe605b852e2 (patch) | |
tree | 5bbd00c57847ae0fdbc5a808ff0b8aa613b27a2f /src/charon/sa/tasks/ike_auth.c | |
parent | 0b0eb6557369c4bc90a70568581b0d80b8d37e0b (diff) | |
download | strongswan-02b3101b670dca4b6e83ce41cf28afe605b852e2.tar.bz2 strongswan-02b3101b670dca4b6e83ce41cf28afe605b852e2.tar.xz |
fixed double free bug
Diffstat (limited to 'src/charon/sa/tasks/ike_auth.c')
-rw-r--r-- | src/charon/sa/tasks/ike_auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/charon/sa/tasks/ike_auth.c b/src/charon/sa/tasks/ike_auth.c index 4ab486ac7..bbc174246 100644 --- a/src/charon/sa/tasks/ike_auth.c +++ b/src/charon/sa/tasks/ike_auth.c @@ -108,7 +108,6 @@ static status_t build_payloads(private_ike_auth_t *this, message_t *message) me = this->ike_sa->get_my_id(this->ike_sa); other = this->ike_sa->get_other_id(this->ike_sa); - /* create own authenticator and add auth payload */ policy = this->ike_sa->get_policy(this->ike_sa); if (!policy) @@ -126,7 +125,7 @@ static status_t build_payloads(private_ike_auth_t *this, message_t *message) SIG(IKE_UP_FAILED, "negotiation of own ID failed"); return FAILED; } - this->ike_sa->set_my_id(this->ike_sa, me); + this->ike_sa->set_my_id(this->ike_sa, me->clone(me)); } id_payload = id_payload_create_from_identification(this->initiator, me); @@ -214,6 +213,7 @@ static void process_payloads(private_ike_auth_t *this, message_t *message) if (this->initiator) { this->ike_sa->set_other_id(this->ike_sa, idr); + DESTROY_IF(idi); } else { |