From: Amit Purwar Date: Fri, 26 Apr 2019 09:25:32 +0000 (+0530) Subject: Fixed bluetoothd crash due to illegal access of request X-Git-Tag: accepted/tizen/unified/20190522.085452~1^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa82f706ecf33cb9cd6421c5b372ef887f528486;p=platform%2Fupstream%2Fbluez.git Fixed bluetoothd crash due to illegal access of request Change-Id: I687ae73b0faa0f1e366e72649b9a9ace5d059ad5 Signed-off-by: Amit Purwar --- diff --git a/src/device.c b/src/device.c index 2ef80ec..41a6dae 100644 --- a/src/device.c +++ b/src/device.c @@ -3060,8 +3060,10 @@ static void device_svc_resolved(struct btd_device *dev, uint8_t browse_type, store_services(dev); } +#ifndef TIZEN_FEATURE_BLUEZ_MODIFY if (req) browse_request_complete(req, browse_type, bdaddr_type, err); +#endif while (dev->svc_callbacks) { struct svc_callback *cb = dev->svc_callbacks->data; @@ -3077,11 +3079,16 @@ static void device_svc_resolved(struct btd_device *dev, uint8_t browse_type, } #ifdef TIZEN_FEATURE_BLUEZ_MODIFY + if (!req) + return; + /* If bdaddr_type is LE but req is for SDP, don't complete browse req. */ if (bdaddr_type != BDADDR_BREDR && req->search_uuid) { DBG("Discover comp. is for LE but browse req. is for SDP."); return; } + + browse_request_complete(req, browse_type, bdaddr_type, err); #endif }