Fix pushAppListChangedEvent json-c object reference count error 08/25608/1 10.0.1 10.0.2 jellyfish/10.0.1 jellyfish/10.0.2 jellyfish_10.0.1 jellyfish_10.0.2
authorYevgeny Hong <yev@drimaes.com>
Thu, 5 Nov 2020 11:56:45 +0000 (11:56 +0000)
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>
Tue, 24 Nov 2020 20:49:40 +0000 (20:49 +0000)
The agl-service-homescreen has been shut down due to an error in this part when installing or uninstalling the application.

Bug-AGL: SPEC-3679
Signed-off-by: Yevgeny Hong <yev@drimaes.com>
Change-Id: I276d57ade7db96dd2a3aaa59d54a1d259c17bef7
(cherry picked from commit a06ae44353446b2684a4a43f4332ad93a43feadb)

src/hs-appinfo.cpp

index 9ccd660..b072ee0 100644 (file)
@@ -247,7 +247,7 @@ int HS_AppInfo::updateAppDetailList(afb_api_t api, struct json_object *object)
                 json_object_put(j_runnable);
                 return 1;
             }
-            addAppDetail(j_found);
+            addAppDetail(json_object_get(j_found));
             pushAppListChangedEvent(_keyInstall, j_found);
         }
         else {
@@ -261,7 +261,7 @@ int HS_AppInfo::updateAppDetailList(afb_api_t api, struct json_object *object)
             AFB_INFO("uninstalled application isn't in runnables list, appid=%s.", appid.c_str());
             return 1;
         }
-        pushAppListChangedEvent(_keyUninstall, obj_data);
+        pushAppListChangedEvent(_keyUninstall, json_object_get(obj_data));
         removeAppDetail(appid);
     }
     else {