chelsio/chtls: unlock on error in chtls_pt_recvmsg()
[ Upstream commit 832ce924b1a14e139e184a6da9f5a69a5e47b256 ] This error path needs to release some memory and call release_sock(sk); before returning. Fixes: 6919a8264a32 ("Crypto/chtls: add/delete TLS header in driver") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
8ee7ef4a57
commit
4246f7dc35
@ -1564,8 +1564,10 @@ found_ok_skb:
|
||||
cerr = put_cmsg(msg, SOL_TLS, TLS_GET_RECORD_TYPE,
|
||||
sizeof(thdr->type), &thdr->type);
|
||||
|
||||
if (cerr && thdr->type != TLS_RECORD_TYPE_DATA)
|
||||
return -EIO;
|
||||
if (cerr && thdr->type != TLS_RECORD_TYPE_DATA) {
|
||||
copied = -EIO;
|
||||
break;
|
||||
}
|
||||
/* don't send tls header, skip copy */
|
||||
goto skip_copy;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user