Fix a bug about loading app property 96/265596/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 25 Oct 2021 00:38:17 +0000 (09:38 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 25 Oct 2021 00:38:17 +0000 (09:38 +0900)
When calling the _app_property_load() function twice, the metadata
information are dropped. This patch prevents to remove the loaded
information from the app property handle.

Change-Id: Id61cdeefe5938ba8ce447b5b055b6f0f60cf9a6c
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/lib/amd_app_property.c

index 2445765..9772cde 100644 (file)
@@ -577,6 +577,12 @@ int _app_property_load(uid_t uid)
        int ret;
        struct app_property_s *prop;
 
+       prop = _app_property_find(uid);
+       if (prop) {
+               _D("Already exists. uid(%u)", uid);
+               return 0;
+       }
+
        prop = __create_app_property(uid);
        if (prop == NULL)
                return -1;