diff options
-rw-r--r-- | keystore/keystore.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/keystore/keystore.cpp b/keystore/keystore.cpp index b36f65f..85289ad 100644 --- a/keystore/keystore.cpp +++ b/keystore/keystore.cpp @@ -2478,8 +2478,6 @@ public: } } keymaster_key_param_set_t inParams = {opParams.data(), opParams.size()}; - keymaster_key_param_set_t outParams = {NULL, 0}; - err = dev->begin(dev, purpose, &key, &inParams, &outParams, &handle); // Create a keyid for this key. keymaster::km_id_t keyid; @@ -2501,6 +2499,9 @@ public: return; } + keymaster_key_param_set_t outParams = {NULL, 0}; + err = dev->begin(dev, purpose, &key, &inParams, &outParams, &handle); + // If there are too many operations abort the oldest operation that was // started as pruneable and try again. while (err == KM_ERROR_TOO_MANY_OPERATIONS && mOperationMap.hasPruneableOperation()) { |