netem: fix possible skb leak
authorEric Dumazet <edumazet@google.com>
Sun, 29 Apr 2012 09:08:22 +0000 (09:08 +0000)
committerVarun Wadekar <vwadekar@nvidia.com>
Mon, 14 May 2012 13:31:06 +0000 (18:31 +0530)
commit708eed688a8bcce27de0c5e5bb20df9f72f8d361
tree87d4876b7414f4d5d006cec3262a5074e46d4f97
parent2b66fd6572d3ccbe804a7fd53b8103374955db96
netem: fix possible skb leak

skb_checksum_help(skb) can return an error, we must free skb in this
case. qdisc_drop(skb, sch) can also be feeded with a NULL skb (if
skb_unshare() failed), so lets use this generic helper.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Stephen Hemminger <shemminger@osdl.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_netem.c