mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 09:08:20 +00:00
Fix memory leak in x509_check_cert_hostname bif
This commit is contained in:
parent
93d7778f97
commit
4ad5d2031b
1 changed files with 6 additions and 1 deletions
|
@ -1060,9 +1060,14 @@ function x509_check_cert_hostname%(cert_opaque: opaque of x509, hostname: string
|
|||
#endif
|
||||
std::string_view nameview {name, len};
|
||||
if ( check_hostname(hostview, nameview) )
|
||||
return zeek::make_intrusive<zeek::StringVal>(len, name);
|
||||
{
|
||||
auto retval = zeek::make_intrusive<zeek::StringVal>(len, name);
|
||||
GENERAL_NAMES_free(altname);
|
||||
return retval;
|
||||
}
|
||||
}
|
||||
GENERAL_NAMES_free(altname);
|
||||
}
|
||||
else
|
||||
{
|
||||
// ok, we have to get the last CN from the Subject. Let's do that.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue