This is an automated email from the ASF dual-hosted git repository.

btashton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 756e244b182e16fe12000e09f9e9810ddf60aa56
Author: Petro Karashchenko <petro.karashche...@gmail.com>
AuthorDate: Mon Apr 24 14:46:04 2023 +0300

    wireless/bluetooth: fix double buffer free
    
    Signed-off-by: Petro Karashchenko <petro.karashche...@gmail.com>
---
 wireless/bluetooth/bt_hcicore.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/wireless/bluetooth/bt_hcicore.c b/wireless/bluetooth/bt_hcicore.c
index 24b2fffbdd..1f1b5f1d98 100644
--- a/wireless/bluetooth/bt_hcicore.c
+++ b/wireless/bluetooth/bt_hcicore.c
@@ -252,7 +252,6 @@ static void hci_acl(FAR struct bt_buf_s *buf)
     {
       wlerr("ERROR:  ACL data length mismatch (%u != %u)\n",
              buf->len, len);
-      bt_buf_release(buf);
       return;
     }
 
@@ -261,12 +260,10 @@ static void hci_acl(FAR struct bt_buf_s *buf)
     {
       wlerr("ERROR:  Unable to find conn for handle %u\n",
             buf->u.acl.handle);
-      bt_buf_release(buf);
       return;
     }
 
   bt_conn_receive(conn, buf, flags);
-  bt_conn_release(conn);
 }
 
 /* HCI event processing */
@@ -964,8 +961,6 @@ static void hci_event(FAR struct bt_buf_s *buf)
         wlwarn("WARNING:  Unhandled event 0x%02x\n", hdr->evt);
         break;
     }
-
-  bt_buf_release(buf);
 }
 #endif
 
@@ -1075,7 +1070,6 @@ static void hci_rx_work(FAR void *arg)
 
           default:
             wlerr("ERROR:  Unknown buf type %u\n", buf->type);
-            bt_buf_release(buf);
             break;
         }
 #else

Reply via email to