Remove potential double free
Janis noticed that GetAuthTokenKey has ownership retained by the
implementer, but the caller in libgatekeeper is delete[]ing it.
Bug: 120610663
Test: gatekeeper-unit-tests, Gatekeeper 1.0 VTS against Trusty
Change-Id: I67171d707706b1ebe5caad47447762144495e28b
diff --git a/gatekeeper.cpp b/gatekeeper.cpp
index e9e9e9d..9097491 100644
--- a/gatekeeper.cpp
+++ b/gatekeeper.cpp
@@ -250,7 +250,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));
}