diff options
author | Martin Willi <martin@strongswan.org> | 2008-12-19 14:34:40 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2008-12-19 14:34:40 +0000 |
commit | 12d4186f5c6de5771d8d5ae544dcebf2727a4e5a (patch) | |
tree | 9a7ad016c0267198bc93cc374cfbd4b993922608 | |
parent | f6035833fad15bfa2a481ec2d22482dc3c645842 (diff) | |
download | strongswan-12d4186f5c6de5771d8d5ae544dcebf2727a4e5a.tar.bz2 strongswan-12d4186f5c6de5771d8d5ae544dcebf2727a4e5a.tar.xz |
fixed a potential memory leak when reusing mobike task
-rw-r--r-- | src/charon/sa/tasks/ike_mobike.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/charon/sa/tasks/ike_mobike.c b/src/charon/sa/tasks/ike_mobike.c index fc7df498d..b2ef2731f 100644 --- a/src/charon/sa/tasks/ike_mobike.c +++ b/src/charon/sa/tasks/ike_mobike.c @@ -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; |