diff options
Diffstat (limited to 'net/core/skbuff.c')
-rw-r--r-- | net/core/skbuff.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 6b0ff396fa9d..a592ca025fc4 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -4293,7 +4293,7 @@ void skb_complete_tx_timestamp(struct sk_buff *skb, | |||
4293 | struct sock *sk = skb->sk; | 4293 | struct sock *sk = skb->sk; |
4294 | 4294 | ||
4295 | if (!skb_may_tx_timestamp(sk, false)) | 4295 | if (!skb_may_tx_timestamp(sk, false)) |
4296 | return; | 4296 | goto err; |
4297 | 4297 | ||
4298 | /* Take a reference to prevent skb_orphan() from freeing the socket, | 4298 | /* Take a reference to prevent skb_orphan() from freeing the socket, |
4299 | * but only if the socket refcount is not zero. | 4299 | * but only if the socket refcount is not zero. |
@@ -4302,7 +4302,11 @@ void skb_complete_tx_timestamp(struct sk_buff *skb, | |||
4302 | *skb_hwtstamps(skb) = *hwtstamps; | 4302 | *skb_hwtstamps(skb) = *hwtstamps; |
4303 | __skb_complete_tx_timestamp(skb, sk, SCM_TSTAMP_SND, false); | 4303 | __skb_complete_tx_timestamp(skb, sk, SCM_TSTAMP_SND, false); |
4304 | sock_put(sk); | 4304 | sock_put(sk); |
4305 | return; | ||
4305 | } | 4306 | } |
4307 | |||
4308 | err: | ||
4309 | kfree_skb(skb); | ||
4306 | } | 4310 | } |
4307 | EXPORT_SYMBOL_GPL(skb_complete_tx_timestamp); | 4311 | EXPORT_SYMBOL_GPL(skb_complete_tx_timestamp); |
4308 | 4312 | ||