internet: Prevent freeing a stack variable

This commit is contained in:
Gabriel Ferreira
2023-10-23 15:10:51 -03:00
parent a4fc843c72
commit 88134dd6be

View File

@@ -206,12 +206,12 @@ TcpHeaderWithRFC793OptionTestCase::CheckCorrectDeserialize()
{
TcpHeader source;
TcpHeader destination;
TcpOptionNOP temp;
auto temp = CreateObject<TcpOptionNOP>();
Buffer buffer;
buffer.AddAtStart(40);
Buffer::Iterator i = buffer.Begin();
source.AppendOption(&temp);
source.AppendOption(temp);
source.Serialize(i);