GH715: Missed some null-check-removals. follow commits 412bafdcf5, and 7c96dbcdab
authorFdaSilvaYY <fdasilvayy@gmail.com>
Sun, 28 Feb 2016 15:01:41 +0000 (16:01 +0100)
committerRich Salz <rsalz@openssl.org>
Sun, 28 Feb 2016 22:40:08 +0000 (17:40 -0500)
Signed-off-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/dsa/dsa_lib.c

index 9f4ddfd..f892973 100644 (file)
@@ -144,8 +144,7 @@ DSA *DSA_new_method(ENGINE *engine)
     CRYPTO_new_ex_data(CRYPTO_EX_INDEX_DSA, ret, &ret->ex_data);
     if ((ret->meth->init != NULL) && !ret->meth->init(ret)) {
 #ifndef OPENSSL_NO_ENGINE
-        if (ret->engine)
-            ENGINE_finish(ret->engine);
+        ENGINE_finish(ret->engine);
 #endif
         CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DSA, ret, &ret->ex_data);
         OPENSSL_free(ret);
@@ -171,8 +170,7 @@ void DSA_free(DSA *r)
     if (r->meth->finish)
         r->meth->finish(r);
 #ifndef OPENSSL_NO_ENGINE
-    if (r->engine)
-        ENGINE_finish(r->engine);
+    ENGINE_finish(r->engine);
 #endif
 
     CRYPTO_free_ex_data(CRYPTO_EX_INDEX_DSA, r, &r->ex_data);