Repository: incubator-mynewt-core
Updated Branches:
  refs/heads/develop 21387d2b7 -> 28a8d7c39


BLE Host - Fix double mbuf free.

ble_l2cap_tx() always consumes the supplied mbuf, regardless of return
code.  However, ble_att_clt_tx() was freeing the mbuf again when
ble_l2cap_tx() failed.


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/28a8d7c3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/28a8d7c3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/28a8d7c3

Branch: refs/heads/develop
Commit: 28a8d7c39a9931b781f14222cf8763a01b1e64f6
Parents: 21387d2
Author: Christopher Collins <[email protected]>
Authored: Fri Jan 6 14:28:23 2017 -0800
Committer: Christopher Collins <[email protected]>
Committed: Fri Jan 6 14:29:14 2017 -0800

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


http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/28a8d7c3/net/nimble/host/src/ble_att_clt.c
----------------------------------------------------------------------
diff --git a/net/nimble/host/src/ble_att_clt.c 
b/net/nimble/host/src/ble_att_clt.c
index e7cd69c..fe57e8d 100644
--- a/net/nimble/host/src/ble_att_clt.c
+++ b/net/nimble/host/src/ble_att_clt.c
@@ -76,6 +76,7 @@ ble_att_clt_tx_req(uint16_t conn_handle, struct os_mbuf *txom)
     } else {
         ble_att_truncate_to_mtu(chan, txom);
         rc = ble_l2cap_tx(conn, chan, txom);
+        txom = NULL;
     }
 
     ble_hs_unlock();

Reply via email to