Fix svace issue 36/223236/1
authorWootak Jung <wootak.jung@samsung.com>
Tue, 28 Jan 2020 01:20:53 +0000 (10:20 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Tue, 28 Jan 2020 01:20:53 +0000 (10:20 +0900)
NULL dereference issue

Change-Id: I4f2b0ecbbea53403fa84e55db27d98a162e09369

bt-oal/bluez_hal/src/bt-hal-gatt-client.c

index 56aa2d4..71571a2 100644 (file)
@@ -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);