diff options
author | Martin Willi <martin@strongswan.org> | 2007-11-19 11:28:11 +0000 |
---|---|---|
committer | Martin Willi <martin@strongswan.org> | 2007-11-19 11:28:11 +0000 |
commit | 729a6ec965a97ecd714b8b36b564a07ad0a7fd1f (patch) | |
tree | 20bbeadfea6a5dc48c04556af60deb972ada3cb6 /src | |
parent | 83ac4cde640dc2542eeadeda839790e506291696 (diff) | |
download | strongswan-729a6ec965a97ecd714b8b36b564a07ad0a7fd1f.tar.bz2 strongswan-729a6ec965a97ecd714b8b36b564a07ad0a7fd1f.tar.xz |
fixed two leaks in stroke_interface
Diffstat (limited to 'src')
-rwxr-xr-x | src/charon/control/interfaces/stroke_interface.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/charon/control/interfaces/stroke_interface.c b/src/charon/control/interfaces/stroke_interface.c index 34622f9c1..134044b96 100755 --- a/src/charon/control/interfaces/stroke_interface.c +++ b/src/charon/control/interfaces/stroke_interface.c @@ -239,7 +239,6 @@ static void stroke_add_conn(stroke_msg_t *msg, FILE *out) bool other_ca_same =FALSE; host_t *my_host, *other_host, *my_subnet, *other_subnet; host_t *my_vip = NULL, *other_vip = NULL; - linked_list_t *my_groups = linked_list_create(); linked_list_t *other_groups = linked_list_create(); proposal_t *proposal; traffic_selector_t *my_ts, *other_ts; @@ -262,7 +261,7 @@ static void stroke_add_conn(stroke_msg_t *msg, FILE *out) DBG2(DBG_CFG, " p2p_mediated_by=%s", msg->add_conn.p2p.mediated_by); DBG2(DBG_CFG, " p2p_peerid=%s", msg->add_conn.p2p.peerid); - my_host = msg->add_conn.me.address? + my_host = msg->add_conn.me.address ? host_create_from_string(msg->add_conn.me.address, IKE_PORT) : NULL; if (my_host == NULL) { @@ -365,11 +364,11 @@ static void stroke_add_conn(stroke_msg_t *msg, FILE *out) } } else -#endif /* P2P */ { - // no peer ID supplied, assume right ID + /* no peer ID supplied, assume right ID */ peer_id = other_id->clone(other_id); } +#endif /* P2P */ my_subnet = host_create_from_string(msg->add_conn.me.subnet ? msg->add_conn.me.subnet : msg->add_conn.me.address, IKE_PORT); @@ -564,9 +563,8 @@ static void stroke_add_conn(stroke_msg_t *msg, FILE *out) other_host->destroy(other_host); other_id->destroy(other_id); other_ca->destroy(other_ca); - peer_id->destroy(peer_id); + DESTROY_IF(peer_id); DESTROY_IF(mediated_by_cfg); - ietfAttr_list_destroy(my_groups); ietfAttr_list_destroy(other_groups); } else |