diff options
-rw-r--r-- | net/bluetooth/cmtp/core.c | 3 | ||||
-rw-r--r-- | net/bluetooth/hci_core.c | 3 | ||||
-rw-r--r-- | net/bluetooth/l2cap.c | 3 |
3 files changed, 3 insertions, 6 deletions
diff --git a/net/bluetooth/cmtp/core.c b/net/bluetooth/cmtp/core.c index c9cac7719efe..0073ec8495da 100644 --- a/net/bluetooth/cmtp/core.c +++ b/net/bluetooth/cmtp/core.c | |||
@@ -126,8 +126,7 @@ static inline void cmtp_add_msgpart(struct cmtp_session *session, int id, const | |||
126 | 126 | ||
127 | session->reassembly[id] = nskb; | 127 | session->reassembly[id] = nskb; |
128 | 128 | ||
129 | if (skb) | 129 | kfree_skb(skb); |
130 | kfree_skb(skb); | ||
131 | } | 130 | } |
132 | 131 | ||
133 | static inline int cmtp_recv_frame(struct cmtp_session *session, struct sk_buff *skb) | 132 | static inline int cmtp_recv_frame(struct cmtp_session *session, struct sk_buff *skb) |
diff --git a/net/bluetooth/hci_core.c b/net/bluetooth/hci_core.c index ba78cc1eb8d9..cd061510b6bd 100644 --- a/net/bluetooth/hci_core.c +++ b/net/bluetooth/hci_core.c | |||
@@ -1565,8 +1565,7 @@ static void hci_cmd_task(unsigned long arg) | |||
1565 | 1565 | ||
1566 | /* Send queued commands */ | 1566 | /* Send queued commands */ |
1567 | if (atomic_read(&hdev->cmd_cnt) && (skb = skb_dequeue(&hdev->cmd_q))) { | 1567 | if (atomic_read(&hdev->cmd_cnt) && (skb = skb_dequeue(&hdev->cmd_q))) { |
1568 | if (hdev->sent_cmd) | 1568 | kfree_skb(hdev->sent_cmd); |
1569 | kfree_skb(hdev->sent_cmd); | ||
1570 | 1569 | ||
1571 | if ((hdev->sent_cmd = skb_clone(skb, GFP_ATOMIC))) { | 1570 | if ((hdev->sent_cmd = skb_clone(skb, GFP_ATOMIC))) { |
1572 | atomic_dec(&hdev->cmd_cnt); | 1571 | atomic_dec(&hdev->cmd_cnt); |
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index db6fbf129be0..ca4d3b40d5ce 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -518,8 +518,7 @@ static void l2cap_conn_del(struct hci_conn *hcon, int err) | |||
518 | 518 | ||
519 | BT_DBG("hcon %p conn %p, err %d", hcon, conn, err); | 519 | BT_DBG("hcon %p conn %p, err %d", hcon, conn, err); |
520 | 520 | ||
521 | if (conn->rx_skb) | 521 | kfree_skb(conn->rx_skb); |
522 | kfree_skb(conn->rx_skb); | ||
523 | 522 | ||
524 | /* Kill channels */ | 523 | /* Kill channels */ |
525 | while ((sk = conn->chan_list.head)) { | 524 | while ((sk = conn->chan_list.head)) { |