6lowpan: move skb_free from error paths in decompression
authorMartin Townsend <mtownsend1973@gmail.com>
Thu, 6 Nov 2014 19:15:13 +0000 (19:15 +0000)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 6 Nov 2014 21:09:48 +0000 (22:09 +0100)
commit56b2c3eea398c772dd895dc62c18cbdd1ba127b1
treea4d6ab3f6bbf38f4c5b3cb66cc6f77d142397e32
parent9645c76c7c233da82ff7aced0177c8a131a51e70
6lowpan: move skb_free from error paths in decompression

Currently we ensure that the skb is freed on every error path in IPHC
decompression which makes it easy to introduce skb leaks.  By centralising
the skb_free into the receive function it makes future decompression routines
easier to maintain.  It does come at the expense of ensuring that the skb
passed into the decompression routine must not be copied.

Signed-off-by: Martin Townsend <mtownsend1973@gmail.com>
Acked-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Acked-by: Alexander Aring <alex.aring@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/6lowpan/iphc.c
net/bluetooth/6lowpan.c
net/ieee802154/6lowpan_rtnl.c