From 8343c3041c0440cb5dcd57a612394a3adcb961f9 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Tue, 17 Mar 2020 08:42:40 +0900 Subject: [PATCH] Fix the crash in CONTROLLER_ERROR event Change-Id: I859ef4bb74a2d36d3af7dafa6bd68c9506ccdc2b Signed-off-by: DoHyun Pyun --- bt-oal/oal-adapter-mgr.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bt-oal/oal-adapter-mgr.c b/bt-oal/oal-adapter-mgr.c index 258a3ea..6b66301 100644 --- a/bt-oal/oal-adapter-mgr.c +++ b/bt-oal/oal-adapter-mgr.c @@ -1110,10 +1110,15 @@ static void cb_adapter_device_found(int num_properties, bt_property_t *propertie void cb_controller_error_received(uint8_t error_code) { + uint8_t *event_data; + BT_DBG("+"); + event_data = g_new0(uint8_t, 1); + *event_data = error_code; + send_event(OAL_EVENT_CONTROLLER_ERROR_RECEIVED, - &error_code, sizeof(uint8_t)); + (gpointer)event_data, sizeof(uint8_t)); BT_DBG("-"); } \ No newline at end of file -- 2.7.4