From af9f4bb36d96f42cc525630077439d820908fd20 Mon Sep 17 00:00:00 2001 From: Wootak Jung Date: Tue, 28 Jan 2020 10:20:53 +0900 Subject: [PATCH] Fix svace issue NULL dereference issue Change-Id: I4f2b0ecbbea53403fa84e55db27d98a162e09369 --- bt-oal/bluez_hal/src/bt-hal-gatt-client.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bt-oal/bluez_hal/src/bt-hal-gatt-client.c b/bt-oal/bluez_hal/src/bt-hal-gatt-client.c index 56aa2d4..71571a2 100644 --- a/bt-oal/bluez_hal/src/bt-hal-gatt-client.c +++ b/bt-oal/bluez_hal/src/bt-hal-gatt-client.c @@ -3925,9 +3925,15 @@ static bt_status_t __hal_gattc_get_service_info(hal_gattc_server_info_t *server_ } } + if (uuid_str == NULL || gp_char_array == NULL) { + ERR("uuid_str and gp_char_array should be set"); + goto done; + } + /* Create new service */ _gattc_create_new_service(server_info, is_primary, uuid_str, service_path, gp_char_array); +done: g_variant_iter_free(property_iter); g_variant_unref(result); g_object_unref(properties_proxy); -- 2.7.4