diff options
author | 2015-12-10 17:08:40 +0000 | |
---|---|---|
committer | 2015-12-10 17:08:40 +0000 | |
commit | 1b895242ce0e7b0bb67e09a5f50eb9e279005ed7 (patch) | |
tree | 671497ed555e2ccf32a2feb5783adf0518e53434 /usr.bin/ssh/cipher.c | |
parent | Map SOCKS error codes to error strings. With input from deraadt@ (diff) | |
download | wireguard-openbsd-1b895242ce0e7b0bb67e09a5f50eb9e279005ed7.tar.xz wireguard-openbsd-1b895242ce0e7b0bb67e09a5f50eb9e279005ed7.zip |
Remove NULL-checks before free().
ok dtucker@
Diffstat (limited to 'usr.bin/ssh/cipher.c')
-rw-r--r-- | usr.bin/ssh/cipher.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/usr.bin/ssh/cipher.c b/usr.bin/ssh/cipher.c index 4e74ca73120..c4341e270db 100644 --- a/usr.bin/ssh/cipher.c +++ b/usr.bin/ssh/cipher.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cipher.c,v 1.100 2015/01/14 10:29:45 djm Exp $ */ +/* $OpenBSD: cipher.c,v 1.101 2015/12/10 17:08:40 mmcc Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -347,8 +347,7 @@ cipher_init(struct sshcipher_ctx *cc, const struct sshcipher *cipher, if (cipher->discard_len > 0) { if ((junk = malloc(cipher->discard_len)) == NULL || (discard = malloc(cipher->discard_len)) == NULL) { - if (junk != NULL) - free(junk); + free(junk); ret = SSH_ERR_ALLOC_FAIL; goto bad; } |