OpenSSL: Fix memory leak in TOD policy validation
Returned policies from X509_get_ext_d2i() need to be freed.
Fixes: 21f1a1e66c
("Report TOD policy")
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
This commit is contained in:
parent
8296ee1805
commit
297d69161b
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue