wayland: Plug leak in error condition

If we fail to bind the X11 socket, free the lock file string.

CID: #1505865
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2061>
This commit is contained in:
Carlos Garnacho 2021-10-24 23:57:55 +02:00
parent f6726c61ca
commit ccaa4c049b

View File

@ -777,6 +777,7 @@ choose_xdisplay (MetaXWaylandManager *manager,
{ {
g_prefix_error (&local_error, "Failed to bind X11 socket: "); g_prefix_error (&local_error, "Failed to bind X11 socket: ");
g_propagate_error (error, g_steal_pointer (&local_error)); g_propagate_error (error, g_steal_pointer (&local_error));
g_free (lock_file);
return FALSE; return FALSE;
} }