summaryrefslogtreecommitdiff
path: root/net/core/pktgen.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-14 17:28:49 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-14 17:28:49 (GMT)
commit43096597a4cc4bd3f912be8a69dbd12e27e08038 (patch)
tree88cb4ba7562b0883aa987ee43f42a6c9bf9cd05f /net/core/pktgen.c
parent79aa79bac979323a8cb10438be16d29cf252167d (diff)
parent485013717020cd8961337309e359d6cef43d6022 (diff)
downloadlinux-fsl-qoriq-43096597a4cc4bd3f912be8a69dbd12e27e08038.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: qlge: Fix page size ifdef test. net: Rationalise email address: Network Specific Parts dsa: fix compile bug on s390 netns: mib6 section fixlet enic: Fix Kconfig headline description de2104x: wrong MAC address fix s390: claw compile fixlet net: export genphy_restart_aneg cxgb3: extend copyrights to 2008 cxgb3: update driver version net/phy: add missing kernel-doc pktgen: fix skb leak in case of failure mISDN/dsp_cmx.c: fix size checks misdn: use nonseekable_open() net: fix driver build errors due to missing net/ip6_checksum.h include
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r--net/core/pktgen.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index a756847..99f656d 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -2474,7 +2474,7 @@ static inline int process_ipsec(struct pktgen_dev *pkt_dev,
if (ret < 0) {
printk(KERN_ERR "Error expanding "
"ipsec packet %d\n",ret);
- return 0;
+ goto err;
}
}
@@ -2484,8 +2484,7 @@ static inline int process_ipsec(struct pktgen_dev *pkt_dev,
if (ret) {
printk(KERN_ERR "Error creating ipsec "
"packet %d\n",ret);
- kfree_skb(skb);
- return 0;
+ goto err;
}
/* restore ll */
eth = (__u8 *) skb_push(skb, ETH_HLEN);
@@ -2494,6 +2493,9 @@ static inline int process_ipsec(struct pktgen_dev *pkt_dev,
}
}
return 1;
+err:
+ kfree_skb(skb);
+ return 0;
}
#endif