Merge the 2019-08-01 SPL branch from AOSP-Partner
* security-aosp-nyc-mr2-release:
Remove potential double free
Change-Id: I033ef38abe5803f766320221198a2ab8d728416a
diff --git a/gatekeeper.cpp b/gatekeeper.cpp
index 44993cf..607da7a 100644
--- a/gatekeeper.cpp
+++ b/gatekeeper.cpp
@@ -235,7 +235,6 @@
uint32_t hash_len = (uint32_t)((uint8_t *)&token->hmac - (uint8_t *)token);
ComputeSignature(token->hmac, sizeof(token->hmac), auth_token_key, key_len,
reinterpret_cast<uint8_t *>(token), hash_len);
- delete[] auth_token_key;
} else {
memset(token->hmac, 0, sizeof(token->hmac));
}