Bluetooth: Fix double free of SMP data skb
authorJohan Hedberg <johan.hedberg@intel.com>
Mon, 11 Aug 2014 19:06:39 +0000 (22:06 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 14 Aug 2014 06:49:23 +0000 (08:49 +0200)
In the case that the SMP recv callback returns error the calling code in
l2cap_core.c expects that it still owns the skb and will try to free it.
The SMP code should therefore not try to free the skb if it return an
error. This patch fixes such behavior in the SMP command handler
function.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
net/bluetooth/smp.c

Simple merge