Fix NULL pointer dereferencing issue 86/214486/1
authorWootak Jung <wootak.jung@samsung.com>
Mon, 23 Sep 2019 08:32:09 +0000 (17:32 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Mon, 23 Sep 2019 08:32:09 +0000 (17:32 +0900)
Change-Id: I42db1cb8239519c6d796a0e83bd08c0aca5498ad

profiles/input/device.c

index 754becc..1625264 100644 (file)
@@ -1539,6 +1539,8 @@ static struct input_device *find_device_role(const bdaddr_t *src,
                /* This will make sure we have hid device service for device */
                device_probe_profiles(device, NULL);
                service = btd_device_get_service(device, HID_DEVICE_UUID);
+               if (service == NULL)
+                       return NULL;
        }
 
        return btd_service_get_user_data(service);