mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 17:18: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,8 +1060,13 @@ function x509_check_cert_hostname%(cert_opaque: opaque of x509, hostname: string
|
||||||
#endif
|
#endif
|
||||||
std::string_view nameview {name, len};
|
std::string_view nameview {name, len};
|
||||||
if ( check_hostname(hostview, nameview) )
|
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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue