mirror of
https://github.com/zeek/zeek.git
synced 2025-10-14 04:28:20 +00:00
Refactor IP_Hdr class ctors (addresses #532).
They now take an explicit flag argument toggling whether the other pointer argument needs to be released on destruction.
This commit is contained in:
parent
ada5f38d04
commit
dfad686d7c
7 changed files with 16 additions and 26 deletions
|
@ -196,7 +196,7 @@ void PIA_TCP::FirstPacket(bool is_orig, const IP_Hdr* ip)
|
|||
ip4->ip_p = IPPROTO_TCP;
|
||||
|
||||
// Cast to const so that it doesn't delete it.
|
||||
ip4_hdr = new IP_Hdr((const struct ip*) ip4);
|
||||
ip4_hdr = new IP_Hdr(ip4, false);
|
||||
}
|
||||
|
||||
if ( is_orig )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue