aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/cert_create/src/main.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/cert_create/src/main.c b/tools/cert_create/src/main.c
index 368493a88..31978a995 100644
--- a/tools/cert_create/src/main.c
+++ b/tools/cert_create/src/main.c
@@ -581,6 +581,13 @@ int main(int argc, char *argv[])
}
}
+ /* If we got here, then we must have filled the key array completely.
+ * We can then safely call free on all of the keys in the array
+ */
+ for (i = 0; i < num_keys; i++) {
+ EVP_PKEY_free(keys[i].key);
+ }
+
#ifndef OPENSSL_NO_ENGINE
ENGINE_cleanup();
#endif