diff options
Diffstat (limited to 'net/decnet/af_decnet.c')
-rw-r--r-- | net/decnet/af_decnet.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c index 70e027375682..3456cd331835 100644 --- a/net/decnet/af_decnet.c +++ b/net/decnet/af_decnet.c | |||
@@ -1178,8 +1178,10 @@ static int dn_getname(struct socket *sock, struct sockaddr *uaddr,int *uaddr_len | |||
1178 | if (peer) { | 1178 | if (peer) { |
1179 | if ((sock->state != SS_CONNECTED && | 1179 | if ((sock->state != SS_CONNECTED && |
1180 | sock->state != SS_CONNECTING) && | 1180 | sock->state != SS_CONNECTING) && |
1181 | scp->accept_mode == ACC_IMMED) | 1181 | scp->accept_mode == ACC_IMMED) { |
1182 | release_sock(sk); | ||
1182 | return -ENOTCONN; | 1183 | return -ENOTCONN; |
1184 | } | ||
1183 | 1185 | ||
1184 | memcpy(sa, &scp->peer, sizeof(struct sockaddr_dn)); | 1186 | memcpy(sa, &scp->peer, sizeof(struct sockaddr_dn)); |
1185 | } else { | 1187 | } else { |