diff options
Diffstat (limited to 'include/net/inet_common.h')
-rw-r--r-- | include/net/inet_common.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/net/inet_common.h b/include/net/inet_common.h index 279f83591971..109e3ee9108c 100644 --- a/include/net/inet_common.h +++ b/include/net/inet_common.h | |||
@@ -41,7 +41,8 @@ int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, | |||
41 | 41 | ||
42 | static inline void inet_ctl_sock_destroy(struct sock *sk) | 42 | static inline void inet_ctl_sock_destroy(struct sock *sk) |
43 | { | 43 | { |
44 | sock_release(sk->sk_socket); | 44 | if (sk) |
45 | sock_release(sk->sk_socket); | ||
45 | } | 46 | } |
46 | 47 | ||
47 | #endif | 48 | #endif |