summaryrefslogtreecommitdiff
path: root/net/l2tp/l2tp_core.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-10-26 13:48:49 -0700
committerJohn Stultz <john.stultz@linaro.org>2011-10-26 13:48:49 -0700
commit2216773fc021964a413409141d439de4f6a108f7 (patch)
tree7b2f8cdcdf5fb05d75bd92f0c8d9ac635ceec48c /net/l2tp/l2tp_core.c
parent42ac8ca89aef66618e8ae2d6e48e3f523bfcd69d (diff)
parentaf1bdb79ca64ceadc7b44b11929b384eff66ce59 (diff)
Merge branch 'upstream/linaro-3.1' into linaro-android-3.1-agreen-rebaselinux-linaro-3.1-2011.10-2-android-0
Diffstat (limited to 'net/l2tp/l2tp_core.c')
-rw-r--r--net/l2tp/l2tp_core.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/l2tp/l2tp_core.c b/net/l2tp/l2tp_core.c
index ad4ac2601a5..34b2ddeacb6 100644
--- a/net/l2tp/l2tp_core.c
+++ b/net/l2tp/l2tp_core.c
@@ -1045,8 +1045,10 @@ int l2tp_xmit_skb(struct l2tp_session *session, struct sk_buff *skb, int hdr_len
headroom = NET_SKB_PAD + sizeof(struct iphdr) +
uhlen + hdr_len;
old_headroom = skb_headroom(skb);
- if (skb_cow_head(skb, headroom))
+ if (skb_cow_head(skb, headroom)) {
+ dev_kfree_skb(skb);
goto abort;
+ }
new_headroom = skb_headroom(skb);
skb_orphan(skb);