[mutter] wayland/keyboard: Don't free NULL anonymous file



commit 8303752e326d73a7f23e3d4b6317d5389be0a9d5
Author: Jonas Ã…dahl <jadahl gmail com>
Date:   Wed Apr 14 15:13:08 2021 +0200

    wayland/keyboard: Don't free NULL anonymous file
    
    Use g_clear_pointer() instead, as meta_anonymous_file_free() rightfully
    doesn't like being passed NULL.
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1822>

 src/wayland/meta-wayland-keyboard.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/src/wayland/meta-wayland-keyboard.c b/src/wayland/meta-wayland-keyboard.c
index 578f3ac0c4..836939c9d3 100644
--- a/src/wayland/meta-wayland-keyboard.c
+++ b/src/wayland/meta-wayland-keyboard.c
@@ -536,7 +536,7 @@ meta_wayland_xkb_info_destroy (MetaWaylandXkbInfo *xkb_info)
 {
   g_clear_pointer (&xkb_info->keymap, xkb_keymap_unref);
   g_clear_pointer (&xkb_info->state, xkb_state_unref);
-  meta_anonymous_file_free (xkb_info->keymap_rofile);
+  g_clear_pointer (&xkb_info->keymap_rofile, meta_anonymous_file_free);
 }
 
 void


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