Fix the coverity issue 67/209467/1 accepted/tizen/unified/20190708.114143 submit/tizen/20190708.064701
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 8 Jul 2019 06:24:40 +0000 (15:24 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 8 Jul 2019 06:24:40 +0000 (15:24 +0900)
Change-Id: I4e99194310af80cbca01213a25bc8594c2167dcf
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
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 */