xwayland: Initialize g_autofree with NULL

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1990>
This commit is contained in:
Dor Askayo 2021-09-04 22:52:45 +03:00
parent 2239e7ad29
commit 264b5b825f

View File

@ -140,7 +140,7 @@ meta_xwayland_is_xwayland_surface (MetaWaylandSurface *surface)
static char * static char *
meta_xwayland_get_exe_from_proc_entry (const char *proc_entry) meta_xwayland_get_exe_from_proc_entry (const char *proc_entry)
{ {
g_autofree char *exepath; g_autofree char *exepath = NULL;
char *executable; char *executable;
char *p; char *p;
@ -160,7 +160,7 @@ meta_xwayland_get_exe_from_proc_entry (const char *proc_entry)
static char * static char *
meta_xwayland_get_exe_from_pid (uint32_t pid) meta_xwayland_get_exe_from_pid (uint32_t pid)
{ {
g_autofree char *proc_entry; g_autofree char *proc_entry = NULL;
char *executable; char *executable;
proc_entry = g_strdup_printf ("/proc/%i/exe", pid); proc_entry = g_strdup_printf ("/proc/%i/exe", pid);
@ -172,7 +172,7 @@ meta_xwayland_get_exe_from_pid (uint32_t pid)
static char * static char *
meta_xwayland_get_self_exe (void) meta_xwayland_get_self_exe (void)
{ {
g_autofree char *proc_entry; g_autofree char *proc_entry = NULL;
char *executable; char *executable;
proc_entry = g_strdup_printf ("/proc/self/exe"); proc_entry = g_strdup_printf ("/proc/self/exe");