diff options
author | mmcc@openbsd.org <mmcc@openbsd.org> | 2015-12-10 17:08:40 +0000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2015-12-11 13:23:14 +1100 |
commit | d59ce08811bf94111c2f442184cf7d1257ffae24 (patch) | |
tree | 5885ad687f762834250c9c3f5b53b3f1b750c9f1 /kex.c | |
parent | 8e56dd46cb37879c73bce2d6032cf5e7f82d5a71 (diff) |
upstream commit
Remove NULL-checks before free().
ok dtucker@
Upstream-ID: e3d3cb1ce900179906af36517b5eea0fb15e6ef8
Diffstat (limited to 'kex.c')
-rw-r--r-- | kex.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: kex.c,v 1.113 2015/12/04 16:41:28 markus Exp $ */ | 1 | /* $OpenBSD: kex.c,v 1.114 2015/12/10 17:08:40 mmcc Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. | 3 | * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. |
4 | * | 4 | * |
@@ -906,8 +906,7 @@ derive_key(struct ssh *ssh, int id, u_int need, u_char *hash, u_int hashlen, | |||
906 | digest = NULL; | 906 | digest = NULL; |
907 | r = 0; | 907 | r = 0; |
908 | out: | 908 | out: |
909 | if (digest) | 909 | free(digest); |
910 | free(digest); | ||
911 | ssh_digest_free(hashctx); | 910 | ssh_digest_free(hashctx); |
912 | return r; | 911 | return r; |
913 | } | 912 | } |