[Model]COMMON
[BinType] AP
[Customer]N/A
[Issue#]Memeory leak reported by cppcheck automated tool
[Request]Internal
[Occurrence Version]PK6
[Problem]Memeory leak reported by cppcheck tool
[Cause & Measure]We were no freeing the memory
[Checking Method]Gatt test tool
[Team]BT
[Developer]Syam Sidhardhan <s.syam@samsung.com>
[Solution company] Samsung
[Change Type]N/A
Change-Id: I2002d1f47cc3381a7db442cb72e3880af1a09aac
(cherry picked from commit
24374850100b737a9132c7b02a61955aed97326f)
BT_INFO("The watcher is already set");
return BLUETOOTH_ERROR_NONE;
}
- addr = g_malloc0(sizeof(bluetooth_device_address_t));
- memcpy(addr, address, sizeof(bluetooth_device_address_t));
if (service_monitor_list == NULL) {
BT_ERR("There is NO watcher");
return BLUETOOTH_ERROR_NONE;
}
+ addr = g_malloc0(sizeof(bluetooth_device_address_t));
+ memcpy(addr, address, sizeof(bluetooth_device_address_t));
service_monitor_list =
g_slist_append(service_monitor_list, addr);