e_policy_wl: remove appinfo when unbind tzpol and tzlaunch_appinfo 97/235597/1
authorJunseok, Kim <juns.kim@samsung.com>
Mon, 8 Jun 2020 04:03:48 +0000 (13:03 +0900)
committerJunseok, Kim <juns.kim@samsung.com>
Mon, 8 Jun 2020 04:03:48 +0000 (13:03 +0900)
Change-Id: I4c2eefd401196cdcca9184f0b9e0220a3cde7e82
Signed-off-by: Junseok, Kim <juns.kim@samsung.com>
src/bin/e_policy_wl.c

index a1421009b747d9674920c91200d4c932c40202ee..30443f29874b2acc95ac2cef6e90fe5f1237c21f 100644 (file)
@@ -3400,6 +3400,13 @@ static void
 _tzpol_cb_unbind(struct wl_resource *res_tzpol)
 {
    E_Policy_Wl_Tzpol *tzpol;
+   E_Appinfo *eai = NULL;
+   pid_t pid = -1;
+
+   wl_client_get_credentials(wl_resource_get_client(res_tzpol), &pid, NULL, NULL);
+   eai = e_appinfo_find_with_pid(pid);
+   if (eai)
+     e_appinfo_del(eai);
 
    tzpol = _e_policy_wl_tzpol_get(res_tzpol);
    EINA_SAFETY_ON_NULL_RETURN(tzpol);
@@ -7039,6 +7046,13 @@ _tzlaunch_appinfo_cb_unbind(struct wl_resource *res_tzlaunch_appinfo)
 {
    E_Policy_Wl_Tzlaunch_Appinfo *tzlaunch_appinfo = NULL;
    Eina_List *l, *ll;
+   E_Appinfo *eai = NULL;
+   pid_t pid = -1;
+
+   wl_client_get_credentials(wl_resource_get_client(res_tzlaunch_appinfo), &pid, NULL, NULL);
+   eai = e_appinfo_find_with_pid(pid);
+   if (eai)
+     e_appinfo_del(eai);
 
    EINA_LIST_FOREACH_SAFE(polwl->tzlaunch_appinfo, l, ll, tzlaunch_appinfo)
      {