e_policy_zone: free client hash when failed to create policy_zone 26/321226/2
authorJunseok Kim <juns.kim@samsung.com>
Mon, 17 Mar 2025 09:37:08 +0000 (18:37 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Mon, 17 Mar 2025 11:13:38 +0000 (11:13 +0000)
Change-Id: Ic2d9300fc5ac9e2e7a4d8c30b59f66e34cf16e1b

src/bin/windowmgr/e_policy_zone.c

index d2ce3d9d68a07e02068dc8b7f991da01da93fe85..4a889305e241728fcd7c994d732dd853a7f29bfe 100644 (file)
@@ -1981,6 +1981,7 @@ e_policy_zone_new(E_Zone *zone)
           zone->focus = e_focus_new(policy_zone, E_FOCUS_EXT_HISTORY);
         if (!zone->focus)
           {
+             if (policy_zone->clients_hash) eina_hash_free(policy_zone->clients_hash);
              e_object_unref(E_OBJECT(zone));
              ERR("Fail to create focus object at zone %d", zone->num);
              E_FREE(policy_zone);
@@ -1994,6 +1995,7 @@ e_policy_zone_new(E_Zone *zone)
         zone->focus = e_focus_new(policy_zone, E_FOCUS_EXT_TOP_STACK);
         if (!zone->focus)
           {
+             if (policy_zone->clients_hash) eina_hash_free(policy_zone->clients_hash);
              e_object_unref(E_OBJECT(zone));
              ERR("Fail to create focus object at zone %d", zone->num);
              E_FREE(policy_zone);