diff options
Diffstat (limited to 'net/tipc/msg.c')
| -rw-r--r-- | net/tipc/msg.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/tipc/msg.c b/net/tipc/msg.c index 67bddcb2ff46..f3c7e5d1fc57 100644 --- a/net/tipc/msg.c +++ b/net/tipc/msg.c @@ -138,10 +138,11 @@ int tipc_buf_append(struct sk_buff **headbuf, struct sk_buff **buf) if (fragid == FIRST_FRAGMENT) { if (unlikely(head)) goto err; - if (unlikely(skb_unclone(frag, GFP_ATOMIC))) + *buf = NULL; + frag = skb_unshare(frag, GFP_ATOMIC); + if (unlikely(!frag)) goto err; head = *headbuf = frag; - *buf = NULL; TIPC_SKB_CB(head)->tail = NULL; if (skb_is_nonlinear(head)) { skb_walk_frags(head, tail) { |
