diff --git a/net/bluetooth/hci_request.c b/net/bluetooth/hci_request.c index 3862fa6bb288..4d5807fff946 100644 --- a/net/bluetooth/hci_request.c +++ b/net/bluetooth/hci_request.c @@ -121,6 +121,7 @@ int __hci_req_sync(struct hci_dev *hdev, int (*func)(struct hci_request *req, { struct hci_request req; int err = 0; + struct sk_buff *req_skb; bt_dev_dbg(hdev, "start"); @@ -182,8 +183,9 @@ int __hci_req_sync(struct hci_dev *hdev, int (*func)(struct hci_request *req, break; } - kfree_skb(hdev->req_skb); + req_skb = hdev->req_skb; hdev->req_skb = NULL; + kfree_skb(req_skb); hdev->req_status = hdev->req_result = 0; bt_dev_dbg(hdev, "end: err %d", err);