diff options
author | 2002-11-06 23:57:36 +0000 | |
---|---|---|
committer | 2002-11-06 23:57:36 +0000 | |
commit | 5d97d718e11a6a8b13dcea1553a9263903c193c5 (patch) | |
tree | 837ff753605e6bb5f0adbf7f85dbd7c85a1fc2c1 | |
parent | - always initialize colormaps, even if the frame buffer is non console; this (diff) | |
download | wireguard-openbsd-5d97d718e11a6a8b13dcea1553a9263903c193c5.tar.xz wireguard-openbsd-5d97d718e11a6a8b13dcea1553a9263903c193c5.zip |
More careful will alloc/free. Spotted by Aref Taidi.
-rw-r--r-- | sbin/isakmpd/exchange.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/isakmpd/exchange.c b/sbin/isakmpd/exchange.c index 592fbee1e31..d2413af23ee 100644 --- a/sbin/isakmpd/exchange.c +++ b/sbin/isakmpd/exchange.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exchange.c,v 1.70 2002/09/11 09:50:43 ho Exp $ */ +/* $OpenBSD: exchange.c,v 1.71 2002/11/06 23:57:36 ho Exp $ */ /* $EOM: exchange.c,v 1.143 2000/12/04 00:02:25 angelos Exp $ */ /* @@ -862,6 +862,11 @@ exchange_establish_p1 (struct transport *t, u_int8_t type, u_int32_t doi, #endif msg = message_alloc (t, 0, ISAKMP_HDR_SZ); + if (!msg) + { + log_print ("exchange_establish_p1: message_alloc () failed"); + exchange_free (exchange); + } msg->exchange = exchange; /* Do not create SA for an information or transaction exchange. */ @@ -878,6 +883,7 @@ exchange_establish_p1 (struct transport *t, u_int8_t type, u_int32_t doi, if (!msg->isakmp_sa) { /* XXX Do something more here? */ + message_free (msg); exchange_free (exchange); return; } |