From 2bfbf15c6582ce1961dac9f637f9d467f0e533e4 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 26 May 2018 06:10:06 +0100 Subject: [PATCH] Remove a redundant failure check after an snew. I spotted this at some point during this week's BinarySink refactoring, but only just remembered to come back and fix it. snew aborts the whole program rather than return NULL, so there's no need to check its return value against NULL. --- import.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/import.c b/import.c index 36d29539..e63282d4 100644 --- a/import.c +++ b/import.c @@ -725,10 +725,6 @@ struct ssh2_userkey *openssh_pem_read(const Filename *filename, /* Construct the key */ retkey = snew(struct ssh2_userkey); - if (!retkey) { - errmsg = "out of memory"; - goto error; - } retkey->alg = alg; put_stringz(blob, alg->name);