From 7b945b3f72fe0f97674e5b62f932a8f94f01b21b Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Thu, 23 Jun 2016 13:59:55 +0300 Subject: [PATCH] core/device: Don't even attempt to load name if address is private Device with private address does not have their name stored so it makes not sense to attempt to load their names. --- src/device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/device.c b/src/device.c index 83a794ecb..5506bc955 100644 --- a/src/device.c +++ b/src/device.c @@ -2655,6 +2655,9 @@ static char *load_cached_name(struct btd_device *device, const char *local, char *str = NULL; int len; + if (device_address_is_private(device)) + return NULL; + snprintf(filename, PATH_MAX, STORAGEDIR "/%s/cache/%s", local, peer); key_file = g_key_file_new(); -- 2.47.3