From 371abe00f052dec37106f2dc22921bc84fb94818 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Tue, 3 Mar 2020 15:06:07 -0800 Subject: Avoid memory leaks Properly discard segments from the segment heap. PiperOrigin-RevId: 298704074 --- pkg/tcpip/transport/tcp/segment_heap.go | 1 + 1 file changed, 1 insertion(+) (limited to 'pkg/tcpip/transport/tcp/segment_heap.go') diff --git a/pkg/tcpip/transport/tcp/segment_heap.go b/pkg/tcpip/transport/tcp/segment_heap.go index 9fd061d7d..e28f213ba 100644 --- a/pkg/tcpip/transport/tcp/segment_heap.go +++ b/pkg/tcpip/transport/tcp/segment_heap.go @@ -41,6 +41,7 @@ func (h *segmentHeap) Pop() interface{} { old := *h n := len(old) x := old[n-1] + old[n-1] = nil *h = old[:n-1] return x } -- cgit v1.2.3