summaryrefslogtreecommitdiff
path: root/net/ax25/ax25_ip.c
diff options
context:
space:
mode:
authorVasily Averin <vvs@virtuozzo.com>2021-08-02 11:52:47 +0300
committerDavid S. Miller <davem@davemloft.net>2021-08-03 11:21:39 +0100
commit53744a4a72afe11779e0c69bbe0fff7dcd83e3ce (patch)
treebdbc1d7b5b49d037af81a55475a33cba5433130c /net/ax25/ax25_ip.c
parent14ee70ca89e62d5888ba1bb3d8a519f233739fe8 (diff)
ax25: use skb_expand_head
Use skb_expand_head() in ax25_transmit_buffer and ax25_rt_build_path. Unlike skb_realloc_headroom, new helper does not allocate a new skb if possible. Signed-off-by: Vasily Averin <vvs@virtuozzo.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ax25/ax25_ip.c')
-rw-r--r--net/ax25/ax25_ip.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/ax25/ax25_ip.c b/net/ax25/ax25_ip.c
index e4f63dd43cb5..36249776c021 100644
--- a/net/ax25/ax25_ip.c
+++ b/net/ax25/ax25_ip.c
@@ -193,10 +193,8 @@ netdev_tx_t ax25_ip_xmit(struct sk_buff *skb)
skb_pull(skb, AX25_KISS_HEADER_LEN);
if (digipeat != NULL) {
- if ((ourskb = ax25_rt_build_path(skb, src, dst, route->digipeat)) == NULL) {
- kfree_skb(skb);
+ if ((ourskb = ax25_rt_build_path(skb, src, dst, route->digipeat)) == NULL)
goto put;
- }
skb = ourskb;
}