Fix Memory Leak: Memory not deallocated. 79/225779/1
authorhimanshu <h.himanshu@samsung.com>
Mon, 24 Feb 2020 06:52:57 +0000 (12:22 +0530)
committerhimanshu <h.himanshu@samsung.com>
Mon, 24 Feb 2020 10:01:58 +0000 (15:31 +0530)
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 <h.himanshu@samsung.com>
bt-oal/bluez_hal/src/bt-hal-adapter-dbus-handler.c

index 3f594c6..41ed4d8 100644 (file)
@@ -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