diff options
author | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-01-30 12:36:14 +0000 |
---|---|---|
committer | Hans-Joerg Hoexer <hshoexer@cvs.openbsd.org> | 2005-01-30 12:36:14 +0000 |
commit | 6696f7ba111a15d39f05c0aaa9ee6e5b1ebea900 (patch) | |
tree | c862cb2c009ecae2244be612c501f54532103ea2 | |
parent | f5e7e577ec72716979ea18c7613a1ad2f440c540 (diff) |
Avoid null pointer dereference when deleting not fully established SAs.
ok ho@
-rw-r--r-- | sbin/isakmpd/sa.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sbin/isakmpd/sa.c b/sbin/isakmpd/sa.c index 14c78576687..c5b4a5178de 100644 --- a/sbin/isakmpd/sa.c +++ b/sbin/isakmpd/sa.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sa.c,v 1.86 2004/08/10 15:59:10 ho Exp $ */ +/* $OpenBSD: sa.c,v 1.87 2005/01/30 12:36:13 hshoexer Exp $ */ /* $EOM: sa.c,v 1.112 2000/12/12 00:22:52 niklas Exp $ */ /* @@ -1069,8 +1069,9 @@ sa_teardown_all(void) */ LOG_DBG((LOG_SA, 70, "sa_teardown_all: tearing down SA %s", - sa->name)); - connection_teardown(sa->name); + sa->name ? sa->name : "<unnamed>")); + if (sa->name) + connection_teardown(sa->name); sa_delete(sa, 1); } } |