upstream commit

don't try to cleanup NULL KEX proposals in
 kex_prop_free(); found by Jukka Taimisto and Markus Hietava
This commit is contained in:
djm@openbsd.org 2015-04-17 13:25:52 +00:00 committed by Damien Miller
parent 3038a19187
commit 44a8e7ce6f
1 changed files with 3 additions and 1 deletions

4
kex.c
View File

@ -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. * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
* *
@ -229,6 +229,8 @@ kex_prop_free(char **proposal)
{ {
u_int i; u_int i;
if (proposal == NULL)
return;
for (i = 0; i < PROPOSAL_MAX; i++) for (i = 0; i < PROPOSAL_MAX; i++)
free(proposal[i]); free(proposal[i]);
free(proposal); free(proposal);