Message ID | 1448921347-8277-1-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/include/net/inet_common.h b/include/net/inet_common.h index b2828a0..a7d812d 100644 --- a/include/net/inet_common.h +++ b/include/net/inet_common.h @@ -42,7 +42,8 @@ int inet_recv_error(struct sock *sk, struct msghdr *msg, int len, static inline void inet_ctl_sock_destroy(struct sock *sk) { - sk_release_kernel(sk); + if (sk) + sk_release_kernel(sk); } #endif