aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet/af_decnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/decnet/af_decnet.c')
-rw-r--r--net/decnet/af_decnet.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index bccb3887773e..a5e3a593e472 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -1075,6 +1075,7 @@ static int dn_accept(struct socket *sock, struct socket *newsock, int flags)
1075 int err = 0; 1075 int err = 0;
1076 unsigned char type; 1076 unsigned char type;
1077 long timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK); 1077 long timeo = sock_rcvtimeo(sk, flags & O_NONBLOCK);
1078 struct dst_entry *dst;
1078 1079
1079 lock_sock(sk); 1080 lock_sock(sk);
1080 1081
@@ -1102,8 +1103,9 @@ static int dn_accept(struct socket *sock, struct socket *newsock, int flags)
1102 } 1103 }
1103 release_sock(sk); 1104 release_sock(sk);
1104 1105
1105 dst_release(xchg(&newsk->sk_dst_cache, skb->dst)); 1106 dst = skb_dst(skb);
1106 skb->dst = NULL; 1107 dst_release(xchg(&newsk->sk_dst_cache, dst));
1108 skb_dst_set(skb, NULL);
1107 1109
1108 DN_SK(newsk)->state = DN_CR; 1110 DN_SK(newsk)->state = DN_CR;
1109 DN_SK(newsk)->addrrem = cb->src_port; 1111 DN_SK(newsk)->addrrem = cb->src_port;