patch-2.1.34 linux/net/ipv4/udp.c

Next file: linux/net/ipv6/addrconf.c
Previous file: linux/net/ipv4/tcp_timer.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.33/linux/net/ipv4/udp.c linux/net/ipv4/udp.c
@@ -768,7 +768,6 @@
 				amount = skb->len-sizeof(struct udphdr);
 			}
 			return put_user(amount, (int *)arg);
-			return(0);
 		}
 
 		default:
@@ -923,8 +922,9 @@
 	sk->state = TCP_CLOSE;
 	if(uh_cache_sk == sk)
 		uh_cache_sk = NULL;
-	release_sock(sk);
 	sk->dead = 1;
+	release_sock(sk);
+	udp_v4_unhash(sk);
 	destroy_sock(sk);
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov