[gtk: 1/2] wayland: avoid referencing unallocated memory when uninhibiting




commit c8d991e4de115bee9469bbd2693e68ac72e25b82
Author: Michael Terry <mike mterry name>
Date:   Sun Dec 6 18:36:58 2020 -0500

    wayland: avoid referencing unallocated memory when uninhibiting

 gtk/gtkapplication-wayland.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gtk/gtkapplication-wayland.c b/gtk/gtkapplication-wayland.c
index 76fa144751..7bc311b7f1 100644
--- a/gtk/gtkapplication-wayland.c
+++ b/gtk/gtkapplication-wayland.c
@@ -122,7 +122,7 @@ gtk_application_impl_wayland_inhibit (GtkApplicationImpl         *impl,
   if (!flags)
     return 0;
 
-  inhibitor = g_slice_new (GtkApplicationWaylandInhibitor);
+  inhibitor = g_slice_new0 (GtkApplicationWaylandInhibitor);
   inhibitor->cookie = ++wayland->next_cookie;
   inhibitor->flags = flags;
   wayland->inhibitors = g_slist_prepend (wayland->inhibitors, inhibitor);


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