summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/stack/route.go
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2020-01-31 21:59:53 +0000
committergVisor bot <gvisor-bot@google.com>2020-01-31 21:59:53 +0000
commit7eba61af72ffb31b1bc480b9f7636be90969009d (patch)
treeb2c49d88b8c684e7f23be14fc5be4e8fdc0a721c /pkg/tcpip/stack/route.go
parent2dbebbcca90e379842d59c579626a45e32f2603c (diff)
parent77bf586db75b3dbd9dcb14c349bde8372d26425c (diff)
Merge release-20200127.0-48-g77bf586 (automated)
Diffstat (limited to 'pkg/tcpip/stack/route.go')
-rw-r--r--pkg/tcpip/stack/route.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/pkg/tcpip/stack/route.go b/pkg/tcpip/stack/route.go
index 517f4b941..f565aafb2 100644
--- a/pkg/tcpip/stack/route.go
+++ b/pkg/tcpip/stack/route.go
@@ -225,7 +225,9 @@ func (r *Route) Release() {
// Clone Clone a route such that the original one can be released and the new
// one will remain valid.
func (r *Route) Clone() Route {
- r.ref.incRef()
+ if r.ref != nil {
+ r.ref.incRef()
+ }
return *r
}