tls-crypto: Fix potential memory leak

Fixes: d8e42a3d4e ("tls-crypto: Share private key search between client and server")
This commit is contained in:
Tobias Brunner 2021-02-16 14:50:50 +01:00
parent f4258c56f5
commit 8384527ff5
1 changed files with 1 additions and 0 deletions

View File

@ -2767,6 +2767,7 @@ enumerator_t *tls_create_private_key_enumerator(tls_version_t min_version,
if (!array_count(enumerator->key_types))
{
private_key_destroy(enumerator);
return NULL;
}
return &enumerator->public;