From: himanshu Date: Mon, 24 Feb 2020 06:52:57 +0000 (+0530) Subject: Fix Memory Leak: Memory not deallocated. X-Git-Tag: submit/tizen/20200226.220348~4^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=f4c3a4c73c31bd9a2c43efbcbbe6eeff5a3492d0;p=platform%2Fcore%2Fconnectivity%2Fbluetooth-frwk.git Fix Memory Leak: Memory not deallocated. The memory created by g_strdup(object_path) in the __bt_hal_extract_adapter_path is not freed. Change-Id: I677b88200fb10e5ab2883fe063865efff54bd2ea Signed-off-by: himanshu --- diff --git a/bt-oal/bluez_hal/src/bt-hal-adapter-dbus-handler.c b/bt-oal/bluez_hal/src/bt-hal-adapter-dbus-handler.c index 3f594c6..41ed4d8 100644 --- a/bt-oal/bluez_hal/src/bt-hal-adapter-dbus-handler.c +++ b/bt-oal/bluez_hal/src/bt-hal-adapter-dbus-handler.c @@ -823,6 +823,8 @@ int _bt_hal_get_adapter_powered_state(uint8_t *state) return ret; } + g_free(adapter_path); + if (powered) *state = 1; else