Skip to content

Commit

Permalink
Merge branch 'batman-adv/merge' of git://git.open-mesh.org/ecsv/linux…
Browse files Browse the repository at this point in the history
…-merge
  • Loading branch information
davem330 committed Feb 8, 2011
2 parents 95c3043 + 531c9da commit 429a01a
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions net/batman-adv/unicast.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,12 @@ static struct sk_buff *frag_merge_packet(struct list_head *head,
skb = tfp->skb;
}

if (skb_linearize(skb) < 0 || skb_linearize(tmp_skb) < 0)
goto err;

skb_pull(tmp_skb, sizeof(struct unicast_frag_packet));
if (pskb_expand_head(skb, 0, tmp_skb->len, GFP_ATOMIC) < 0) {
/* free buffered skb, skb will be freed later */
kfree_skb(tfp->skb);
return NULL;
}
if (pskb_expand_head(skb, 0, tmp_skb->len, GFP_ATOMIC) < 0)
goto err;

/* move free entry to end */
tfp->skb = NULL;
Expand All @@ -70,6 +70,11 @@ static struct sk_buff *frag_merge_packet(struct list_head *head,
unicast_packet->packet_type = BAT_UNICAST;

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)
Expand Down

0 comments on commit 429a01a

Please sign in to comment.