]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream commit
authordjm@openbsd.org <djm@openbsd.org>
Fri, 17 Apr 2015 13:25:52 +0000 (13:25 +0000)
committerDamien Miller <djm@mindrot.org>
Wed, 29 Apr 2015 08:14:20 +0000 (18:14 +1000)
don't try to cleanup NULL KEX proposals in
 kex_prop_free(); found by Jukka Taimisto and Markus Hietava

kex.c

diff --git a/kex.c b/kex.c
index 8c2b00179db9e2b953f6d04e1ffeed73f507e82d..dbc55ef7ee0878874860835874a41c51edeeb039 100644 (file)
--- 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);