Skip to content

Commit

Permalink
[IPSEC]: Fix double free on skb on async output
Browse files Browse the repository at this point in the history
When the output transform returns EINPROGRESS due to async operation we'll
free the skb the straight away as if it were an error.  This patch fixes
that so that the skb is freed when the async operation completes.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Herbert Xu authored and David S. Miller committed Jan 28, 2008
1 parent 15ca36f commit fcb8c15
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions net/xfrm/xfrm_output.c
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ static int xfrm_output_one(struct sk_buff *skb, int err)
spin_unlock_bh(&x->lock);

err = x->type->output(x, skb);
if (err == -EINPROGRESS)
goto out_exit;

resume:
if (err) {
Expand Down

0 comments on commit fcb8c15

Please sign in to comment.