Remove err and prime demo's
[openssl.git] / crypto / engine / eng_table.c
index 16eb77143670afde1a2257cff56333b58f939db0..5fd00ddc2cc24f3ceff47ee743122c8cea0c9350 100644 (file)
@@ -52,7 +52,7 @@
  *
  */
 
-#include "cryptlib.h"
+#include "internal/cryptlib.h"
 #include <openssl/evp.h>
 #include <openssl/lhash.h>
 #include "eng_int.h"
@@ -147,8 +147,8 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup,
         tmplate.nid = *nids;
         fnd = lh_ENGINE_PILE_retrieve(&(*table)->piles, &tmplate);
         if (!fnd) {
-            fnd = OPENSSL_malloc(sizeof(ENGINE_PILE));
-            if (!fnd)
+            fnd = OPENSSL_malloc(sizeof(*fnd));
+            if (fnd == NULL)
                 goto end;
             fnd->uptodate = 1;
             fnd->nid = *nids;