tls: rx: don't free the output in case of zero-copy
[linux-2.6-block.git] / net / tls / tls_strp.c
CommitLineData
c618db2a
JK
1// SPDX-License-Identifier: GPL-2.0-only
2
3#include <linux/skbuff.h>
4
5#include "tls.h"
6
7int tls_strp_msg_hold(struct sock *sk, struct sk_buff *skb,
8 struct sk_buff_head *dst)
9{
10 struct sk_buff *clone;
11
12 clone = skb_clone(skb, sk->sk_allocation);
13 if (!clone)
14 return -ENOMEM;
15 __skb_queue_tail(dst, clone);
16 return 0;
17}