summaryrefslogtreecommitdiffstats
path: root/kex.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2015-04-17 13:25:52 +0000
committerDamien Miller <djm@mindrot.org>2015-04-29 18:14:20 +1000
commit44a8e7ce6f3ab4c2eb1ae49115c210b98e53c4df (patch)
tree1750fb87e5405fbdda0b5e3b2a75c1657e827985 /kex.c
parent3038a191872d2882052306098c1810d14835e704 (diff)
upstream commit
don't try to cleanup NULL KEX proposals in kex_prop_free(); found by Jukka Taimisto and Markus Hietava
Diffstat (limited to 'kex.c')
-rw-r--r--kex.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/kex.c b/kex.c
index 8c2b0017..dbc55ef7 100644
--- a/kex.c
+++ b/kex.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: kex.c,v 1.105 2015/01/30 00:22:25 djm Exp $ */
+/* $OpenBSD: kex.c,v 1.106 2015/04/17 13:25:52 djm Exp $ */
/*
* Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
*
@@ -229,6 +229,8 @@ kex_prop_free(char **proposal)
{
u_int i;
+ if (proposal == NULL)
+ return;
for (i = 0; i < PROPOSAL_MAX; i++)
free(proposal[i]);
free(proposal);