aboutsummaryrefslogtreecommitdiffstats
path: root/src/charon/threads/stroke_interface.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2006-05-29 11:29:23 +0000
committerMartin Willi <martin@strongswan.org>2006-05-29 11:29:23 +0000
commit139ce7871f1a1117ea1c71ec170b7b35698cea48 (patch)
tree14670521a8466e4bb89aac5d7b847b8b8d840e05 /src/charon/threads/stroke_interface.c
parent60b9abf5c1cc644ee22204ba729bb500089273a4 (diff)
downloadstrongswan-139ce7871f1a1117ea1c71ec170b7b35698cea48.tar.bz2
strongswan-139ce7871f1a1117ea1c71ec170b7b35698cea48.tar.xz
- fixed memleak when deleting a connection
Diffstat (limited to 'src/charon/threads/stroke_interface.c')
-rwxr-xr-xsrc/charon/threads/stroke_interface.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/charon/threads/stroke_interface.c b/src/charon/threads/stroke_interface.c
index 9c41701d7..e31be8a1c 100755
--- a/src/charon/threads/stroke_interface.c
+++ b/src/charon/threads/stroke_interface.c
@@ -362,6 +362,7 @@ static void stroke_initiate(private_stroke_t *this, stroke_msg_t *msg)
initiate_ike_sa_job_t *job;
connection_t *connection;
linked_list_t *ike_sas;
+ ike_sa_id_t *ike_sa_id;
pop_string(msg, &(msg->initiate.name));
this->logger->log(this->logger, CONTROL, "received stroke: initiate \"%s\"", msg->initiate.name);
@@ -383,9 +384,12 @@ static void stroke_initiate(private_stroke_t *this, stroke_msg_t *msg)
}
else
{
-
this->stroke_logger->log(this->stroke_logger, CONTROL, "connection \"%s\" already up", msg->initiate.name);
}
+ while (ike_sas->remove_last(ike_sas, (void**)&ike_sa_id) == SUCCESS)
+ {
+ ike_sa_id->destroy(ike_sa_id);
+ }
ike_sas->destroy(ike_sas);
}
}