Commit bb202410 authored by Anton Ryzhov's avatar Anton Ryzhov

Fix releasing memory

parent b2c145ec
...@@ -37,11 +37,10 @@ namespace Titanium.Web.Proxy.Helpers ...@@ -37,11 +37,10 @@ namespace Titanium.Web.Proxy.Helpers
0) == 0) 0) == 0)
{ {
int rowCount = *(int*)tcpTable; int rowCount = *(int*)tcpTable;
tcpTable += 4; // int size
if (ipVersion == IpVersion.Ipv4) if (ipVersion == IpVersion.Ipv4)
{ {
NativeMethods.TcpRow* rowPtr = (NativeMethods.TcpRow*)tcpTable; NativeMethods.TcpRow* rowPtr = (NativeMethods.TcpRow*)(tcpTable + 4);
for (int i = 0; i < rowCount; ++i) for (int i = 0; i < rowCount; ++i)
{ {
...@@ -55,7 +54,7 @@ namespace Titanium.Web.Proxy.Helpers ...@@ -55,7 +54,7 @@ namespace Titanium.Web.Proxy.Helpers
} }
else else
{ {
NativeMethods.Tcp6Row* rowPtr = (NativeMethods.Tcp6Row*)tcpTable; NativeMethods.Tcp6Row* rowPtr = (NativeMethods.Tcp6Row*)(tcpTable + 4);
for (int i = 0; i < rowCount; ++i) for (int i = 0; i < rowCount; ++i)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment