fixed a potential memory leak when reusing mobike task

This commit is contained in:
Martin Willi 2008-12-19 14:34:40 +00:00
parent f6035833fa
commit 12d4186f5c
1 changed files with 4 additions and 0 deletions

View File

@ -521,6 +521,10 @@ static status_t process_i(private_ike_mobike_t *this, message_t *message)
/* start the update with the same task */
this->check = FALSE;
this->address = FALSE;
if (this->natd)
{
this->natd->task.destroy(&this->natd->task);
}
this->natd = ike_natd_create(this->ike_sa, this->initiator);
this->ike_sa->set_pending_updates(this->ike_sa, 1);
return NEED_MORE;