]> git.baikalelectronics.ru Git - kernel.git/commit
Bluetooth: 6lowpan: Avoid memory leak if memory allocation fails
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Wed, 1 Oct 2014 08:30:57 +0000 (11:30 +0300)
committerJohan Hedberg <johan.hedberg@intel.com>
Thu, 2 Oct 2014 10:41:32 +0000 (13:41 +0300)
commitf67cef93595cbd52b4b18bed32cc899a49a3fb4f
treeb1b369c0f169d5c16d21f3cbe2bf998649dd4796
parent9a2bd237dc7e1bbf0b648a8f57eccea17fd2a7db
Bluetooth: 6lowpan: Avoid memory leak if memory allocation fails

If skb_unshare() returns NULL, then we leak the original skb.
Solution is to use temp variable to hold the new skb.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
net/bluetooth/6lowpan.c