From 56e6b99a697f794b3a035daed0cfcf194e56d2d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Asbj=C3=B8rn=20S=C3=A6b=C3=B8?= Date: Tue, 27 Aug 2019 11:26:06 +0200 Subject: [PATCH] Bluetooth: Add log_strdup() to BT_ERR string arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wrap string arguments to BT_ERR in log_strdup(). Signed-off-by: Asbjørn Sæbø --- subsys/bluetooth/host/gatt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/subsys/bluetooth/host/gatt.c b/subsys/bluetooth/host/gatt.c index 3ded47ae550..f4ef15455a9 100644 --- a/subsys/bluetooth/host/gatt.c +++ b/subsys/bluetooth/host/gatt.c @@ -3670,7 +3670,7 @@ static int ccc_set(const char *name, size_t len_rd, settings_read_cb read_cb, err = bt_settings_decode_key(name, &addr); if (err) { - BT_ERR("Unable to decode address %s", name); + BT_ERR("Unable to decode address %s", log_strdup(name)); return -EINVAL; } @@ -3721,7 +3721,7 @@ static int cf_set(const char *name, size_t len_rd, settings_read_cb read_cb, err = bt_settings_decode_key(name, &addr); if (err) { - BT_ERR("Unable to decode address %s", name); + BT_ERR("Unable to decode address %s", log_strdup(name)); return -EINVAL; }