From: Amos Jeffries Date: Fri, 29 Apr 2022 23:16:15 +0000 (+0000) Subject: Fix CID 1503308: Logically dead code (DEADCODE) (#1036) X-Git-Tag: SQUID_6_0_1~199 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=24ed8c0c0ab77815a9afa0fa4b0fa410847ba9a8;p=thirdparty%2Fsquid.git Fix CID 1503308: Logically dead code (DEADCODE) (#1036) The rsa variable has already been checked for nil and cannot be unset before this extra check. Detected by Coverity Scan --- diff --git a/src/ssl/gadgets.cc b/src/ssl/gadgets.cc index e836546b7c..b03489bbe5 100644 --- a/src/ssl/gadgets.cc +++ b/src/ssl/gadgets.cc @@ -31,9 +31,6 @@ EVP_PKEY * Ssl::createSslPrivateKey() if (!RSA_generate_key_ex(rsa.get(), num, bn.get(), NULL)) return NULL; - if (!rsa) - return NULL; - if (!EVP_PKEY_assign_RSA(pkey.get(), (rsa.get()))) return NULL;