drivers: fix log type variables for -fno-common
[dpdk.git] / drivers / crypto / openssl / rte_openssl_pmd.c
index 91f0283..b820f61 100644 (file)
@@ -18,6 +18,7 @@
 
 #define DES_BLOCK_SIZE 8
 
+int openssl_logtype_driver;
 static uint8_t cryptodev_driver_id;
 
 #if (OPENSSL_VERSION_NUMBER < 0x10100000L)
@@ -762,10 +763,10 @@ get_session(struct openssl_qp *qp, struct rte_crypto_op *op)
                        return NULL;
 
                /* provide internal session */
-               void *_sess = NULL;
+               void *_sess = rte_cryptodev_sym_session_create(qp->sess_mp);
                void *_sess_private_data = NULL;
 
-               if (rte_mempool_get(qp->sess_mp, (void **)&_sess))
+               if (_sess == NULL)
                        return NULL;
 
                if (rte_mempool_get(qp->sess_mp_priv,