aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/window_manager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/window_manager.cpp b/src/window_manager.cpp
index dcaf636..7fc47c3 100644
--- a/src/window_manager.cpp
+++ b/src/window_manager.cpp
@@ -493,6 +493,7 @@ bool WindowManager::api_subscribe(afb_req_t req, EventType event_id)
if(event_id < Event_Val_Min || event_id > Event_Val_Max)
{
HMI_ERROR("not defined in Window Manager", event_id);
+ free(appid);
return ret;
}
HMI_INFO("%s subscribe %s : %d", appid, kListEventName[event_id].c_str(), event_id);
@@ -509,17 +510,17 @@ bool WindowManager::api_subscribe(afb_req_t req, EventType event_id)
else if(appid)
{
string id = appid;
- free(appid);
if(!g_app_list.contains(id))
{
g_app_list.addClient(id);
}
- g_app_list.lookUpClient(id)->subscribe(req, kListEventName[event_id]);
+ ret = g_app_list.lookUpClient(id)->subscribe(req, kListEventName[event_id]);
}
else
{
HMI_ERROR("appid is not set");
}
+ free(appid);
return ret;
}