diff options
Diffstat (limited to 'net/netrom/af_netrom.c')
-rw-r--r-- | net/netrom/af_netrom.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/netrom/af_netrom.c b/net/netrom/af_netrom.c index 06592d8b4a2b..1b9024ee963c 100644 --- a/net/netrom/af_netrom.c +++ b/net/netrom/af_netrom.c | |||
@@ -1169,7 +1169,12 @@ static int nr_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
1169 | msg->msg_flags |= MSG_TRUNC; | 1169 | msg->msg_flags |= MSG_TRUNC; |
1170 | } | 1170 | } |
1171 | 1171 | ||
1172 | skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); | 1172 | er = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, copied); |
1173 | if (er < 0) { | ||
1174 | skb_free_datagram(sk, skb); | ||
1175 | release_sock(sk); | ||
1176 | return er; | ||
1177 | } | ||
1173 | 1178 | ||
1174 | if (sax != NULL) { | 1179 | if (sax != NULL) { |
1175 | sax->sax25_family = AF_NETROM; | 1180 | sax->sax25_family = AF_NETROM; |