Fix the coverity issue
[platform/core/connectivity/bluetooth-agent.git] / ag-agent / bluetooth-ag-agent.c
index fecf84b..b9be3f7 100644 (file)
@@ -408,9 +408,12 @@ gboolean __bt_ag_agent_is_companion_device(const char *addr)
 
        if (g_strcmp0(host_device_address, addr) == 0) {
                INFO("addr[%s] is companion device", addr);
+               free(host_device_address);
                return TRUE;
        }
 
+       free(host_device_address);
+
        return FALSE;
 #else
        /* TODO : Need to add companion device check condition for Phone models */