mirror of
https://github.com/zeek/zeek.git
synced 2025-10-09 01:58:20 +00:00
SSH: Fix some memleaks.
This commit is contained in:
parent
fc721d2d25
commit
3190ca275e
1 changed files with 89 additions and 78 deletions
|
@ -425,6 +425,11 @@ refine connection SSH_Conn += {
|
|||
kex_algorithm_ = bytestring();
|
||||
%}
|
||||
|
||||
%cleanup{
|
||||
kex_algorithm_.free();
|
||||
kex_algs_cache_.free();
|
||||
%}
|
||||
|
||||
function get_state(is_orig: bool): int
|
||||
%{
|
||||
if ( is_orig )
|
||||
|
@ -514,6 +519,9 @@ refine connection SSH_Conn += {
|
|||
kex_algorithm_.init((const uint8 *) client_list->Lookup(i)->AsStringVal()->Bytes(),
|
||||
client_list->Lookup(i)->AsStringVal()->Len());
|
||||
|
||||
Unref(client_list);
|
||||
Unref(server_list);
|
||||
|
||||
// UNTESTED
|
||||
if ( update_kex_state_if_equal("rsa1024-sha1", KEX_RSA) )
|
||||
return true;
|
||||
|
@ -557,6 +565,9 @@ refine connection SSH_Conn += {
|
|||
}
|
||||
}
|
||||
|
||||
Unref(client_list);
|
||||
Unref(server_list);
|
||||
|
||||
return true;
|
||||
|
||||
%}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue