diff options
-rw-r--r-- | hash.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -443,10 +443,7 @@ hal_error_t hal_hash_initialize(hal_core_t *core, state->descriptor = descriptor; state->driver = driver; state->core = core; - state->flags = flags; - - if (state_buffer == NULL) - state->flags |= STATE_FLAG_STATE_ALLOCATED; + state->flags = flags | STATE_FLAG_STATE_ALLOCATED; *state_ = state; @@ -777,9 +774,6 @@ hal_error_t hal_hmac_initialize(hal_core_t *core, sizeof(state->hash_state))) != HAL_OK) goto fail; - if (state_buffer == NULL) - h->flags |= STATE_FLAG_STATE_ALLOCATED; - /* * If the supplied HMAC key is longer than the hash block length, we * need to hash the supplied HMAC key to get the real HMAC key. |