]> git.ipfire.org Git - thirdparty/openssl.git/blobdiff - crypto/engine/eng_cryptodev.c
Free engine on error.
[thirdparty/openssl.git] / crypto / engine / eng_cryptodev.c
index 59eab5a74472a6c795fb2002b24ca7cd9fc0ef63..bdc49ed8a8baa6404119bb09b7c602be5ab70613 100644 (file)
@@ -1671,6 +1671,9 @@ void engine_load_cryptodev_int(void)
                                          cryptodev_rsa_nocrt_mod_exp);
             }
         }
+    } else {
+        ENGINE_free(engine);
+        return;
     }
 
 #ifndef OPENSSL_NO_DSA
@@ -1708,6 +1711,9 @@ void engine_load_cryptodev_int(void)
                                             cryptodev_dh_compute_key);
             }
         }
+    } else {
+        ENGINE_free(engine);
+        return;
     }
 #endif