[mutter] xwayland: Initialize g_autofree with NULL



commit 264b5b825fcc33520489e20d7ce8ffa407a76e7b
Author: Dor Askayo <dor askayo gmail com>
Date:   Sat Sep 4 22:52:45 2021 +0300

    xwayland: Initialize g_autofree with NULL
    
    Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1990>

 src/wayland/meta-xwayland.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index dce4facd01..596c8209fe 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -140,7 +140,7 @@ meta_xwayland_is_xwayland_surface (MetaWaylandSurface *surface)
 static char *
 meta_xwayland_get_exe_from_proc_entry (const char *proc_entry)
 {
-  g_autofree char *exepath;
+  g_autofree char *exepath = NULL;
   char *executable;
   char *p;
 
@@ -160,7 +160,7 @@ meta_xwayland_get_exe_from_proc_entry (const char *proc_entry)
 static char *
 meta_xwayland_get_exe_from_pid (uint32_t pid)
 {
-  g_autofree char *proc_entry;
+  g_autofree char *proc_entry = NULL;
   char *executable;
 
   proc_entry = g_strdup_printf ("/proc/%i/exe", pid);
@@ -172,7 +172,7 @@ meta_xwayland_get_exe_from_pid (uint32_t pid)
 static char *
 meta_xwayland_get_self_exe (void)
 {
-  g_autofree char *proc_entry;
+  g_autofree char *proc_entry = NULL;
   char *executable;
 
   proc_entry = g_strdup_printf ("/proc/self/exe");


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