提交 429a01a7 编写于 作者: D David S. Miller

Merge branch 'batman-adv/merge' of git://git.open-mesh.org/ecsv/linux-merge

...@@ -50,12 +50,12 @@ static struct sk_buff *frag_merge_packet(struct list_head *head, ...@@ -50,12 +50,12 @@ static struct sk_buff *frag_merge_packet(struct list_head *head,
skb = tfp->skb; skb = tfp->skb;
} }
if (skb_linearize(skb) < 0 || skb_linearize(tmp_skb) < 0)
goto err;
skb_pull(tmp_skb, sizeof(struct unicast_frag_packet)); skb_pull(tmp_skb, sizeof(struct unicast_frag_packet));
if (pskb_expand_head(skb, 0, tmp_skb->len, GFP_ATOMIC) < 0) { if (pskb_expand_head(skb, 0, tmp_skb->len, GFP_ATOMIC) < 0)
/* free buffered skb, skb will be freed later */ goto err;
kfree_skb(tfp->skb);
return NULL;
}
/* move free entry to end */ /* move free entry to end */
tfp->skb = NULL; tfp->skb = NULL;
...@@ -70,6 +70,11 @@ static struct sk_buff *frag_merge_packet(struct list_head *head, ...@@ -70,6 +70,11 @@ static struct sk_buff *frag_merge_packet(struct list_head *head,
unicast_packet->packet_type = BAT_UNICAST; unicast_packet->packet_type = BAT_UNICAST;
return skb; return skb;
err:
/* free buffered skb, skb will be freed later */
kfree_skb(tfp->skb);
return NULL;
} }
static void frag_create_entry(struct list_head *head, struct sk_buff *skb) static void frag_create_entry(struct list_head *head, struct sk_buff *skb)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册