From 28a42266d1b862379e52e06632cc80ff7e943d95 Mon Sep 17 00:00:00 2001 From: Chad Loder Date: Thu, 10 Mar 2005 17:19:09 +0000 Subject: Avoid crash on finalization. We have been using this diff in production since mid-2003. OK hshoexer@, markus@, ho@ --- sbin/isakmpd/exchange.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'sbin/isakmpd') diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c index c5c720ac372..a5298e37ca2 100644 --- a/sbin/isakmpd/exchange.c +++ b/sbin/isakmpd/exchange.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exchange.c,v 1.110 2005/03/05 12:25:12 ho Exp $ */ +/* $OpenBSD: exchange.c,v 1.111 2005/03/10 17:19:08 cloder Exp $ */ /* $EOM: exchange.c,v 1.143 2000/12/04 00:02:25 angelos Exp $ */ /* @@ -1799,7 +1799,9 @@ exchange_establish(char *name, void (*finalize)(struct exchange *, void *, exchange_add_finalization(exchange, finalize, arg); else { - finalize(0, arg, 1); /* Indicate failure */ + /* Indicate failure */ + if (finalize) + finalize(0, arg, 1); free(name); } return; -- cgit v1.2.3