diff options
Diffstat (limited to 'include/net/timewait_sock.h')
-rw-r--r-- | include/net/timewait_sock.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/net/timewait_sock.h b/include/net/timewait_sock.h index be293d795e38..d7a306ea560d 100644 --- a/include/net/timewait_sock.h +++ b/include/net/timewait_sock.h | |||
@@ -31,6 +31,9 @@ static inline int twsk_unique(struct sock *sk, struct sock *sktw, void *twp) | |||
31 | 31 | ||
32 | static inline void twsk_destructor(struct sock *sk) | 32 | static inline void twsk_destructor(struct sock *sk) |
33 | { | 33 | { |
34 | BUG_ON(sk == NULL); | ||
35 | BUG_ON(sk->sk_prot == NULL); | ||
36 | BUG_ON(sk->sk_prot->twsk_prot == NULL); | ||
34 | if (sk->sk_prot->twsk_prot->twsk_destructor != NULL) | 37 | if (sk->sk_prot->twsk_prot->twsk_destructor != NULL) |
35 | sk->sk_prot->twsk_prot->twsk_destructor(sk); | 38 | sk->sk_prot->twsk_prot->twsk_destructor(sk); |
36 | } | 39 | } |