zephyr/subsys
Szymon Janc da9f9cc3f7 Bluetooth: Fix connection object leak
When canceling outgoing connection initial reference was not dropped.

btshell> connect 11:22:33:44:55:66 public
[bt] [DBG] bt_conn_set_state: (0x0011a1ac) disconnected -> connect-scan
[bt] [DBG] bt_conn_ref: (0x0011a1ac) handle 0 ref 2
[bt] [DBG] bt_conn_ref: (0x0011a1ac) handle 0 ref 3
[bt] [DBG] bt_conn_unref: (0x0011a1ac) handle 0 ref 2
[bt] [DBG] bt_conn_prepare_events: (0x0011b3a0)
[bt] [DBG] bt_conn_prepare_events: (0x0011b3a0)
[bt] [DBG] bt_conn_prepare_events: (0x0011b3a0)
Connection pending
[bt] [DBG] bt_conn_unref: (0x0011a1ac) handle 0 ref 1
btshell>
btshell> disconnect 11:22:33:44:55:66 public
[bt] [DBG] bt_conn_ref: (0x0011a1ac) handle 0 ref 2
[bt] [DBG] bt_conn_ref: (0x0011a1ac) handle 0 ref 3
[bt] [DBG] bt_conn_unref: (0x0011a1ac) handle 0 ref 2
[bt] [DBG] bt_conn_set_state: (0x0011a1ac) connect-scan -> disconnected
[bt] [DBG] bt_conn_prepare_events: (0x0011b3a0)
[bt] [DBG] bt_conn_unref: (0x0011a1ac) handle 0 ref 1
btshell>
btshell> connect 11:22:33:44:55:66 public
[bt] [DBG] bt_conn_ref: (0x0011a1ac) handle 0 ref 2
[bt] [DBG] bt_conn_unref: (0x0011a1ac) handle 0 ref 1
Connection failed
btshell>

Change-Id: I0c38bbed8d1712d07a579275355e7dcd8d6b0b38
Signed-off-by: Szymon Janc <szymon.janc@codecoup.pl>
2017-03-07 12:21:29 +01:00
..
bluetooth Bluetooth: Fix connection object leak 2017-03-07 12:21:29 +01:00
debug subsys: gdb_server: Fix type mismatch 2017-03-01 14:26:16 +00:00
disk license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
fs fat: match type info expected by fat library for f_write 2017-01-30 12:01:50 +00:00
logging kernel: use k_cycle_get_32 instead of sys_cycle_get_32 2017-02-27 21:10:32 +00:00
net net/dns: Improve unaligned memory access 2017-02-27 08:34:06 +00:00
shell shell: If enabled, let's register telnet console as an input 2017-01-27 12:35:53 +02:00
usb license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
Kconfig license: Replace Apache boilerplate with SPDX tag 2017-01-19 03:50:58 +00:00
Makefile subsys: disk: Refactor disk_access stuff into a directory 2017-01-08 20:58:05 +00:00