From d59ce08811bf94111c2f442184cf7d1257ffae24 Mon Sep 17 00:00:00 2001 From: "mmcc@openbsd.org" Date: Thu, 10 Dec 2015 17:08:40 +0000 Subject: upstream commit Remove NULL-checks before free(). ok dtucker@ Upstream-ID: e3d3cb1ce900179906af36517b5eea0fb15e6ef8 --- cipher.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cipher.c') diff --git a/cipher.c b/cipher.c index 02dae6f9..13847e5b 100644 --- a/cipher.c +++ b/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 * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -353,8 +353,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; } -- cgit v1.2.1