Fix static analysis issue 38/287638/1
authorHwankyu Jhun <h.jhun@samsung.com>
Thu, 2 Feb 2023 01:24:10 +0000 (01:24 +0000)
committerHwankyu Jhun <h.jhun@samsung.com>
Thu, 2 Feb 2023 01:24:10 +0000 (01:24 +0000)
Type:
 - Wrapper object use after free

Change-Id: I59d1606ec71b4329df15ca41f65d3fe68f4d7522
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/aul_svc.cc

index 028a5a7..72b9673 100644 (file)
@@ -501,7 +501,7 @@ extern "C" API int aul_svc_set_appid(bundle* b, const char* appid) {
   if (TIZEN_FEATURE_APPSVC_ALIAS) {
     std::string alias_id = ::GetAliasAppId(appid);
     if (!alias_id.empty())
-      appid = alias_id.c_str();
+      return ::SetBundle(b, AUL_SVC_K_PKG_NAME, alias_id.c_str());
   }
 
   return ::SetBundle(b, AUL_SVC_K_PKG_NAME, appid);