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 <luiz.von.dentz@intel.com>
This commit is contained in:
Luiz Augusto von Dentz 2019-08-16 13:41:59 +03:00 committed by Johan Hedberg
commit 67a2ae53ae

View file

@ -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",