]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix CID 1503308: Logically dead code (DEADCODE) (#1036)
authorAmos Jeffries <yadij@users.noreply.github.com>
Fri, 29 Apr 2022 23:16:15 +0000 (23:16 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Sat, 30 Apr 2022 07:46:38 +0000 (07:46 +0000)
The rsa variable has already been checked for nil and
cannot be unset before this extra check.

Detected by Coverity Scan

src/ssl/gadgets.cc

index e836546b7ce233f44203121e7d518c91a8006c42..b03489bbe5267247c0a8d6f05bd4722f2d5d344e 100644 (file)
@@ -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;