X-Git-Url: https://git.kernelconcepts.de/?p=karo-tx-linux.git;a=blobdiff_plain;f=include%2Fnet%2Finet_common.h;h=109e3ee9108c0e0219f6cb64a21dc68f1f519ff6;hp=279f83591971bd886e78e1b20e4a5c29051fc563;hb=b0f85fa11aefc4f3e03306b4cd47f113bd57dcba;hpb=61710a655fa60a7b3e0fd4731bc8403df647b7a3 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, static inline void inet_ctl_sock_destroy(struct sock *sk) { - sock_release(sk->sk_socket); + if (sk) + sock_release(sk->sk_socket); } #endif