diff options
Diffstat (limited to 'net/core/pktgen.c')
-rw-r--r-- | net/core/pktgen.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index a756847e3814..99f656d35b4f 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, | |||
2474 | if (ret < 0) { | 2474 | if (ret < 0) { |
2475 | printk(KERN_ERR "Error expanding " | 2475 | printk(KERN_ERR "Error expanding " |
2476 | "ipsec packet %d\n",ret); | 2476 | "ipsec packet %d\n",ret); |
2477 | return 0; | 2477 | goto err; |
2478 | } | 2478 | } |
2479 | } | 2479 | } |
2480 | 2480 | ||
@@ -2484,8 +2484,7 @@ static inline int process_ipsec(struct pktgen_dev *pkt_dev, | |||
2484 | if (ret) { | 2484 | if (ret) { |
2485 | printk(KERN_ERR "Error creating ipsec " | 2485 | printk(KERN_ERR "Error creating ipsec " |
2486 | "packet %d\n",ret); | 2486 | "packet %d\n",ret); |
2487 | kfree_skb(skb); | 2487 | goto err; |
2488 | return 0; | ||
2489 | } | 2488 | } |
2490 | /* restore ll */ | 2489 | /* restore ll */ |
2491 | eth = (__u8 *) skb_push(skb, ETH_HLEN); | 2490 | eth = (__u8 *) skb_push(skb, ETH_HLEN); |
@@ -2494,6 +2493,9 @@ static inline int process_ipsec(struct pktgen_dev *pkt_dev, | |||
2494 | } | 2493 | } |
2495 | } | 2494 | } |
2496 | return 1; | 2495 | return 1; |
2496 | err: | ||
2497 | kfree_skb(skb); | ||
2498 | return 0; | ||
2497 | } | 2499 | } |
2498 | #endif | 2500 | #endif |
2499 | 2501 | ||