From a00e0437e258766a48faff80e34259c4287f92d4 Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Mon, 8 Jul 2019 15:24:40 +0900 Subject: [PATCH] Fix the coverity issue Change-Id: I4e99194310af80cbca01213a25bc8594c2167dcf Signed-off-by: DoHyun Pyun --- ag-agent/bluetooth-ag-agent.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ag-agent/bluetooth-ag-agent.c b/ag-agent/bluetooth-ag-agent.c index fecf84b..b9be3f7 100644 --- a/ag-agent/bluetooth-ag-agent.c +++ b/ag-agent/bluetooth-ag-agent.c @@ -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 */ -- 2.7.4