diff options
author | Ray Strode <rstrode@redhat.com> | 2015-04-23 10:34:43 -0400 |
---|---|---|
committer | Ray Strode <rstrode@redhat.com> | 2015-04-23 13:51:11 -0400 |
commit | eb56e0a3d7a7d010862eddb6306c7d02997152cf (patch) | |
tree | d2f2c0e278f14f79deb132e172dec4d00252953f | |
parent | 8937c32cd5fe5318cfe946a8be6dcdcae26378f3 (diff) |
xwayland: plug some leaks in stop function
This commit makes sure the lockfile and display
name are freed in meta_xwayland_stop.
https://bugzilla.gnome.org/show_bug.cgi?id=748380
-rw-r--r-- | src/wayland/meta-xwayland.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/wayland/meta-xwayland.c b/src/wayland/meta-xwayland.c index ad6667ea..a7beb0c1 100644 --- a/src/wayland/meta-xwayland.c +++ b/src/wayland/meta-xwayland.c @@ -532,5 +532,10 @@ meta_xwayland_stop (MetaXWaylandManager *manager) snprintf (path, sizeof path, "/tmp/.X11-unix/X%d", manager->display_index); unlink (path); - unlink (manager->lock_file); + g_clear_pointer (&manager->display_name, g_free); + if (manager->lock_file) + { + unlink (manager->lock_file); + g_clear_pointer (&manager->lock_file, g_free); + } } |