[mutter] wayland/inhibit-shortcuts-dialog: Use g_new0 instead of g_new



commit 07f6c85cc737b2f7d106490cc4d336f2404ac9b5
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Tue Sep 12 12:20:31 2017 +0800

    wayland/inhibit-shortcuts-dialog: Use g_new0 instead of g_new
    
    The code assumed the newly allocated blocked was initialized to 0, but
    it wasn't since g_new was used. Fix that by using g_new0.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=787570

 .../meta-wayland-inhibit-shortcuts-dialog.c        |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/wayland/meta-wayland-inhibit-shortcuts-dialog.c 
b/src/wayland/meta-wayland-inhibit-shortcuts-dialog.c
index da897b9..5f883f7 100644
--- a/src/wayland/meta-wayland-inhibit-shortcuts-dialog.c
+++ b/src/wayland/meta-wayland-inhibit-shortcuts-dialog.c
@@ -112,7 +112,7 @@ meta_wayland_surface_ensure_inhibit_shortcuts_dialog (MetaWaylandSurface *surfac
   if (data)
     return data;
 
-  data = g_new (InhibitShortcutsData, 1);
+  data = g_new0 (InhibitShortcutsData, 1);
   surface_inhibit_shortcuts_data_set (surface, data);
   g_signal_connect (surface, "destroy",
                     G_CALLBACK (on_surface_destroyed),


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