From 5c6b5bf599419dbcded8a679855069f4a9685888 Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Tue, 20 Jun 2006 09:53:25 +0000 Subject: [PATCH] fixed bug: usage of already freed mem --- src/charon/sa/states/create_child_sa_requested.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/charon/sa/states/create_child_sa_requested.c b/src/charon/sa/states/create_child_sa_requested.c index 35e3db98d..3e7abe1b8 100644 --- a/src/charon/sa/states/create_child_sa_requested.c +++ b/src/charon/sa/states/create_child_sa_requested.c @@ -376,7 +376,6 @@ static status_t process_message(private_create_child_sa_requested_t *this, messa /* create new state */ this->ike_sa->set_new_state(this->ike_sa, (state_t*)ike_sa_established_create(this->ike_sa)); - this->public.state_interface.destroy(&this->public.state_interface); /* if we are rekeying, inform the old child SA that it has been superseeded and * start its delete */ @@ -387,8 +386,10 @@ static status_t process_message(private_create_child_sa_requested_t *this, messa { old_child_sa->set_rekeyed(old_child_sa); } + this->ike_sa->public.delete_child_sa(&this->ike_sa->public, this->reqid); } + this->public.state_interface.destroy(&this->public.state_interface); return SUCCESS; }