From: Injun Yang Date: Wed, 8 Feb 2017 01:14:43 +0000 (+0900) Subject: Fix: Crash occured when HID deactived X-Git-Tag: accepted/tizen/3.0/common/20170214.180341~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9bb4a05f26ffbf84582f75b55d90c8163b3861a;p=platform%2Fupstream%2Fbluez.git Fix: Crash occured when HID deactived [Model] All [BinType] AP [Customer] OPEN [Issue#] N/A [Request] Internal [Occurence Version] N/A [Problem] When HID deactived, crash occured [Cause & Measure] Access the invalid memory [Checking Method] Check the validation of variable. [Team] Basic Connection [Developer] Injun Yang [Solution company] Samsung [Change Type] Specification change Change-Id: Ifd88e39c98cccb29f3b4eaad23b1fa53b669da47 Signed-off-by: Injun Yang --- diff --git a/src/device.c b/src/device.c index 73ae618..1996ea0 100644 --- a/src/device.c +++ b/src/device.c @@ -5870,6 +5870,9 @@ void device_remove_profile(gpointer a, gpointer b) if (g_strcmp0(profile->local_uuid , HID_DEVICE_UUID) == 0) { l = find_service_with_uuid(device->services, HID_DEVICE_UUID); + if (l == NULL) + return; + service = l->data; if (btd_service_get_state(service) ==