From 67a2ae53ae735b33de99cc73a80b915a076286cf Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Fri, 16 Aug 2019 13:41:59 +0300 Subject: [PATCH] Bluetooth: GATT: Fix assert when storying CCCs This fixes the following crash: ASSERTION FAIL [0] @ ZEPHYR_BASE/subsys/logging/log_core.c:180 argument 2 in log message "%s: Stored CCCs for %s (%s)" missing log_strdup(). Signed-off-by: Luiz Augusto von Dentz --- subsys/bluetooth/host/gatt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/gatt.c b/subsys/bluetooth/host/gatt.c index 966862c12ff..48197d37fcd 100644 --- a/subsys/bluetooth/host/gatt.c +++ b/subsys/bluetooth/host/gatt.c @@ -3419,7 +3419,8 @@ int bt_gatt_store_ccc(u8_t id, const bt_addr_le_t *addr) return err; } - BT_DBG("Stored CCCs for %s (%s)", bt_addr_le_str(addr), key); + BT_DBG("Stored CCCs for %s (%s)", bt_addr_le_str(addr), + log_strdup(key)); if (len) { for (int i = 0; i < save.count; i++) { BT_DBG(" CCC: handle 0x%04x value 0x%04x",