summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorTedd Ho-Jeong An <tedd.an@intel.com>2021-11-12 18:35:59 -0800
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2021-11-15 13:07:08 -0800
commit6ea642f6ef2e2d5486aec092a2596f24e60bca3e (patch)
treeb8bbfe917b1ba64d9be0f96f6195577c36d2a7ce /client
parent9a79c9b74a0453919ace188409cdb2396178e188 (diff)
downloadbluez-6ea642f6ef2e2d5486aec092a2596f24e60bca3e.tar.gz
client: Fix uninitiailzed scalar variable
This patch fixes the uninitiailzed varialble(CWE-457) reported by the Coverity scan.
Diffstat (limited to 'client')
-rw-r--r--client/gatt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/gatt.c b/client/gatt.c
index ce13b3341..9c991c2ac 100644
--- a/client/gatt.c
+++ b/client/gatt.c
@@ -175,6 +175,7 @@ static void print_service_proxy(GDBusProxy *proxy, const char *description)
dbus_message_iter_get_basic(&iter, &primary);
+ memset(&service, 0, sizeof(service));
service.path = (char *) g_dbus_proxy_get_path(proxy);
service.uuid = (char *) uuid;
service.primary = primary;
@@ -257,6 +258,7 @@ static void print_characteristic(GDBusProxy *proxy, const char *description)
dbus_message_iter_get_basic(&iter, &uuid);
+ memset(&chrc, 0, sizeof(chrc));
chrc.path = (char *) g_dbus_proxy_get_path(proxy);
chrc.uuid = (char *) uuid;
@@ -350,6 +352,7 @@ static void print_descriptor(GDBusProxy *proxy, const char *description)
dbus_message_iter_get_basic(&iter, &uuid);
+ memset(&desc, 0, sizeof(desc));
desc.path = (char *) g_dbus_proxy_get_path(proxy);
desc.uuid = (char *) uuid;