summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Garnacho <carlosg@gnome.org>2021-10-24 23:57:55 +0200
committerCarlos Garnacho <carlosg@gnome.org>2021-10-25 15:45:35 +0200
commitccaa4c049bfc0e9957ae2afae21ce2e7c8f4fa93 (patch)
treea03da4711f511592fc503b23acf1c90a1be14634
parentf6726c61ca3f51878667446c8ca4a551ccdf91c1 (diff)
downloadmutter-ccaa4c049bfc0e9957ae2afae21ce2e7c8f4fa93.tar.gz
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>
-rw-r--r--src/wayland/meta-xwayland.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c
index 596c8209f..ff5150d01 100644
--- a/src/wayland/meta-xwayland.c
+++ b/src/wayland/meta-xwayland.c
@@ -777,6 +777,7 @@ choose_xdisplay (MetaXWaylandManager *manager,
{
g_prefix_error (&local_error, "Failed to bind X11 socket: ");
g_propagate_error (error, g_steal_pointer (&local_error));
+ g_free (lock_file);
return FALSE;
}