summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/loopback/loopback.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tcpip/link/loopback/loopback.go')
-rw-r--r--pkg/tcpip/link/loopback/loopback.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkg/tcpip/link/loopback/loopback.go b/pkg/tcpip/link/loopback/loopback.go
index ca1f9c08d..49b0a29a9 100644
--- a/pkg/tcpip/link/loopback/loopback.go
+++ b/pkg/tcpip/link/loopback/loopback.go
@@ -104,6 +104,7 @@ func (e *endpoint) WriteRawPacket(pkt *stack.PacketBuffer) tcpip.Error {
newPkt := stack.NewPacketBuffer(stack.PacketBufferOptions{
Data: data,
})
+ defer newPkt.DecRef()
e.dispatcher.DeliverNetworkPacket("" /* remote */, "" /* local */, pkt.NetworkProtocolNumber, newPkt)
return nil