              if (status != SGX_SUCCESS) {
                  if (enclave_error != NULL)
                      *enclave_error = error_aesm2api(status);
-@@ -842,6 +845,13 @@
+@@ -842,6 +853,13 @@
      }
  
      se_mutex_lock(&s_enclave_mutex);

 {
     se_mutex_lock(&s_device_mutex);
 
@@ -389,7 +392,15 @@
         hdevice_temp = s_hdevice;
     }
     

     
     uint32_t i;
 
@@ -65,6 +68,44 @@
     return ((ex_features | _SGX_EX_FEATURES_MASK_) == _SGX_EX_FEATURES_MASK_);
 }
 
