diff options
author | Tedd Ho-Jeong An <tedd.an@intel.com> | 2021-11-12 18:35:59 -0800 |
---|---|---|
committer | Ayush Garg <ayush.garg@samsung.com> | 2022-03-11 19:08:38 +0530 |
commit | 5682deffc06e0950d33493635b4f985b0d501d93 (patch) | |
tree | a47662607197d38b9e7061089d48fa71d603a52c /client | |
parent | fb099032fa920127c106d849cc7d1a7c1c535878 (diff) | |
download | bluez-5682deffc06e0950d33493635b4f985b0d501d93.tar.gz bluez-5682deffc06e0950d33493635b4f985b0d501d93.tar.bz2 bluez-5682deffc06e0950d33493635b4f985b0d501d93.zip |
client: Fix uninitiailzed scalar variable
This patch fixes the uninitiailzed varialble(CWE-457) reported by
the Coverity scan.
Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
Diffstat (limited to 'client')
-rwxr-xr-x | client/gatt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/client/gatt.c b/client/gatt.c index 2405aa3e..b952d9a1 100755 --- a/client/gatt.c +++ b/client/gatt.c @@ -174,6 +174,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; @@ -256,6 +257,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; @@ -349,6 +351,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; |