aboutsummaryrefslogtreecommitdiffstats
path: root/src/crypto
diff options
context:
space:
mode:
authorJouni Malinen <jouni@codeaurora.org>2020-01-07 18:40:12 (GMT)
committerJouni Malinen <j@w1.fi>2020-01-07 18:40:12 (GMT)
commit297d69161b014ffbc3dd686e2216f29059431717 (patch)
tree2c4d20e357f95fbce82e3e6966430dd379b50edd /src/crypto
parent8296ee18053ce45c0915b791be9d413f9f573402 (diff)
downloadhostap-297d69161b014ffbc3dd686e2216f29059431717.zip
hostap-297d69161b014ffbc3dd686e2216f29059431717.tar.gz
hostap-297d69161b014ffbc3dd686e2216f29059431717.tar.bz2
OpenSSL: Fix memory leak in TOD policy validation
Returned policies from X509_get_ext_d2i() need to be freed. Fixes: 21f1a1e66c39 ("Report TOD policy") Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
Diffstat (limited to 'src/crypto')
-rw-r--r--src/crypto/tls_openssl.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/crypto/tls_openssl.c b/src/crypto/tls_openssl.c
index a4a647e..a6a4ce4 100644
--- a/src/crypto/tls_openssl.c
+++ b/src/crypto/tls_openssl.c
@@ -2190,6 +2190,7 @@ static int openssl_cert_tod(X509 *cert)
else if (os_strcmp(buf, "1.3.6.1.4.1.40808.1.3.2") == 0 && !tod)
tod = 2; /* TOD-TOFU */
}
+ sk_POLICYINFO_pop_free(ext, POLICYINFO_free);
return tod;
}