You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by we...@apache.org on 2016/08/11 21:27:34 UTC

[34/50] [abbrv] incubator-mynewt-core git commit: BLE Host - Fix crash when #-evt-bufs > #-os-events

BLE Host - Fix crash when #-evt-bufs > #-os-events

When the host could not allocate an OS event for the incoming HCI event,
it tried to free the wrong thing, resulting in a null pointer
dereference.


Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/202e5c3e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/202e5c3e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/202e5c3e

Branch: refs/heads/phyrx_no_mbuf
Commit: 202e5c3e9b18997c32fe9229217324e8440a43a6
Parents: 2c3618d
Author: Christopher Collins <cc...@apache.org>
Authored: Tue Aug 9 17:51:37 2016 -0700
Committer: William San Filippo <wi...@runtime.io>
Committed: Thu Aug 11 14:26:26 2016 -0700

----------------------------------------------------------------------
 net/nimble/host/src/ble_hs.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/202e5c3e/net/nimble/host/src/ble_hs.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_hs.c b/net/nimble/host/src/ble_hs.c
index 231dce3..8d4b047 100644
--- a/net/nimble/host/src/ble_hs.c
+++ b/net/nimble/host/src/ble_hs.c
@@ -406,7 +406,7 @@ ble_hs_enqueue_hci_event(uint8_t *hci_evt)
 
     ev = os_memblock_get(&ble_hs_hci_ev_pool);
     if (ev == NULL) {
-        ble_hci_trans_buf_free(ev->ev_arg);
+        ble_hci_trans_buf_free(hci_evt);
     } else {
         ev->ev_queued = 0;
         ev->ev_type = BLE_HOST_HCI_EVENT_CTLR_EVENT;