diff options
author | Markus Friedl <markus@cvs.openbsd.org> | 2005-03-04 13:33:33 +0000 |
---|---|---|
committer | Markus Friedl <markus@cvs.openbsd.org> | 2005-03-04 13:33:33 +0000 |
commit | 304192bf98a18de1a33ece7a80137d0210fbca8f (patch) | |
tree | ecc339eec37eb34d2d8725ebbfdd61c0bd877535 /sbin/isakmpd/exchange.c | |
parent | 8ddcb72dc7ee3bc6f342154450eb4f4dbdd335ed (diff) |
fix leak when a phase 2 SA cannot create an exchange for the matching phase 1
ok ho@, hshoexer@
Diffstat (limited to 'sbin/isakmpd/exchange.c')
-rw-r--r-- | sbin/isakmpd/exchange.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c index 53fb83d2fe2..e45340b37d2 100644 --- a/sbin/isakmpd/exchange.c +++ b/sbin/isakmpd/exchange.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exchange.c,v 1.108 2005/03/02 13:27:12 hshoexer Exp $ */ +/* $OpenBSD: exchange.c,v 1.109 2005/03/04 13:33:32 markus Exp $ */ /* $EOM: exchange.c,v 1.143 2000/12/04 00:02:25 angelos Exp $ */ /* @@ -1773,6 +1773,7 @@ exchange_establish(char *name, void (*finalize)(struct exchange *, void *, log_print("exchange_establish: " "[%s]:ISAKMP-peer's (%s) phase is not 1", name, peer); + free(name); return; } /* @@ -1794,8 +1795,10 @@ exchange_establish(char *name, void (*finalize)(struct exchange *, void *, if (exchange) exchange_add_finalization(exchange, finalize, arg); - else + else { finalize(0, arg, 1); /* Indicate failure */ + free(name); + } return; } else exchange_establish_p2(isakmp_sa, 0, name, 0, finalize, |