diff options
Diffstat (limited to 'net/appletalk')
-rw-r--r-- | net/appletalk/ddp.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/net/appletalk/ddp.c b/net/appletalk/ddp.c index 206e771e82d1..956a5302002a 100644 --- a/net/appletalk/ddp.c +++ b/net/appletalk/ddp.c | |||
@@ -1051,16 +1051,17 @@ static int atalk_release(struct socket *sock) | |||
1051 | { | 1051 | { |
1052 | struct sock *sk = sock->sk; | 1052 | struct sock *sk = sock->sk; |
1053 | 1053 | ||
1054 | sock_hold(sk); | ||
1055 | lock_sock(sk); | ||
1056 | if (sk) { | 1054 | if (sk) { |
1055 | sock_hold(sk); | ||
1056 | lock_sock(sk); | ||
1057 | |||
1057 | sock_orphan(sk); | 1058 | sock_orphan(sk); |
1058 | sock->sk = NULL; | 1059 | sock->sk = NULL; |
1059 | atalk_destroy_socket(sk); | 1060 | atalk_destroy_socket(sk); |
1060 | } | ||
1061 | release_sock(sk); | ||
1062 | sock_put(sk); | ||
1063 | 1061 | ||
1062 | release_sock(sk); | ||
1063 | sock_put(sk); | ||
1064 | } | ||
1064 | return 0; | 1065 | return 0; |
1065 | } | 1066 | } |
1066 | 1067 | ||