[metacity] group: free group if returning early



commit 826285ac1d59c5ccf79102b79acfa23bbcc6defc
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date:   Thu Apr 30 01:03:54 2020 +0300

    group: free group if returning early
    
    Based on mutter commit:
    https://gitlab.gnome.org/GNOME/mutter/-/commit/1d75d5aa2f5e5a7b1457

 src/core/group.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/src/core/group.c b/src/core/group.c
index 13c0b1c5..8b45939e 100644
--- a/src/core/group.c
+++ b/src/core/group.c
@@ -53,7 +53,10 @@ meta_group_new (MetaDisplay *display,
                 attrs.your_event_mask | PropertyChangeMask);
 
   if (meta_error_trap_pop_with_return (display) != 0)
-    return NULL;
+    {
+      g_free (group);
+      return NULL;
+    }
 
   if (display->groups_by_leader == NULL)
     display->groups_by_leader = g_hash_table_new (meta_unsigned_long_hash,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]