diff options
author | David S. Miller <davem@davemloft.net> | 2011-02-07 22:54:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-07 22:54:14 -0500 |
commit | 429a01a70f301baf0c8fc780f891a18c296d5e24 (patch) | |
tree | 663ee8a8c0a47d364648d5f905f185e875e48d62 /net | |
parent | 95c3043008ca8449feb96aba5481fe31c2ea750b (diff) | |
parent | 531c9da8c854c5b075383253a57fdd4e0be82e99 (diff) |
Merge branch 'batman-adv/merge' of git://git.open-mesh.org/ecsv/linux-merge
Diffstat (limited to 'net')
-rw-r--r-- | net/batman-adv/unicast.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/net/batman-adv/unicast.c b/net/batman-adv/unicast.c index ee41fef04b21..d1a611322549 100644 --- a/net/batman-adv/unicast.c +++ b/net/batman-adv/unicast.c | |||
@@ -50,12 +50,12 @@ static struct sk_buff *frag_merge_packet(struct list_head *head, | |||
50 | skb = tfp->skb; | 50 | skb = tfp->skb; |
51 | } | 51 | } |
52 | 52 | ||
53 | if (skb_linearize(skb) < 0 || skb_linearize(tmp_skb) < 0) | ||
54 | goto err; | ||
55 | |||
53 | skb_pull(tmp_skb, sizeof(struct unicast_frag_packet)); | 56 | skb_pull(tmp_skb, sizeof(struct unicast_frag_packet)); |
54 | if (pskb_expand_head(skb, 0, tmp_skb->len, GFP_ATOMIC) < 0) { | 57 | if (pskb_expand_head(skb, 0, tmp_skb->len, GFP_ATOMIC) < 0) |
55 | /* free buffered skb, skb will be freed later */ | 58 | goto err; |
56 | kfree_skb(tfp->skb); | ||
57 | return NULL; | ||
58 | } | ||
59 | 59 | ||
60 | /* move free entry to end */ | 60 | /* move free entry to end */ |
61 | tfp->skb = NULL; | 61 | tfp->skb = NULL; |
@@ -70,6 +70,11 @@ static struct sk_buff *frag_merge_packet(struct list_head *head, | |||
70 | unicast_packet->packet_type = BAT_UNICAST; | 70 | unicast_packet->packet_type = BAT_UNICAST; |
71 | 71 | ||
72 | return skb; | 72 | return skb; |
73 | |||
74 | err: | ||
75 | /* free buffered skb, skb will be freed later */ | ||
76 | kfree_skb(tfp->skb); | ||
77 | return NULL; | ||
73 | } | 78 | } |
74 | 79 | ||
75 | static void frag_create_entry(struct list_head *head, struct sk_buff *skb) | 80 | static void frag_create_entry(struct list_head *head, struct sk_buff *skb) |