After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 748380 - miscellaneous xwayland fixes
miscellaneous xwayland fixes
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: wayland
unspecified
Other All
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-04-23 17:50 UTC by Ray Strode [halfline]
Modified: 2015-04-23 17:51 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
xwayland: use out label for cleanup in start function (4.90 KB, patch)
2015-04-23 17:50 UTC, Ray Strode [halfline]
committed Details | Review
xwayland: free lockfile in start function on error (2.63 KB, patch)
2015-04-23 17:50 UTC, Ray Strode [halfline]
committed Details | Review
xwayland: don't unlink lock file twice in stop function (1.72 KB, patch)
2015-04-23 17:50 UTC, Ray Strode [halfline]
committed Details | Review
xwayland: rename lockfile to lock_file (9.26 KB, patch)
2015-04-23 17:50 UTC, Ray Strode [halfline]
committed Details | Review
xwayland: plug some leaks in stop function (1.59 KB, patch)
2015-04-23 17:50 UTC, Ray Strode [halfline]
committed Details | Review

Description Ray Strode [halfline] 2015-04-23 17:50:04 UTC
This bug has a few code clean ups and leak fixes to the xwayland code.
Comment 1 Ray Strode [halfline] 2015-04-23 17:50:08 UTC
Created attachment 302256 [details] [review]
xwayland: use out label for cleanup in start function

The start function has a few exit paths that need to
perform clean up of the lock file.

This commit consolidates those exit paths at the end
using an out label and gotos.
Comment 2 Ray Strode [halfline] 2015-04-23 17:50:12 UTC
Created attachment 302257 [details] [review]
xwayland: free lockfile in start function on error

Right now we just leak the lockfile.
Comment 3 Ray Strode [halfline] 2015-04-23 17:50:17 UTC
Created attachment 302258 [details] [review]
xwayland: don't unlink lock file twice in stop function

The stop function currently manually constructs the lock
filename from the display number and also calls unlink
on the same, already known lock filename from the manager
struct.

This commit gets rid fo the manual construction in favor
of the saved lock filename.
Comment 4 Ray Strode [halfline] 2015-04-23 17:50:21 UTC
Created attachment 302259 [details] [review]
xwayland: rename lockfile to lock_file

The missing underscore is inconsistent with the
coding style of the surrounding code.
Comment 5 Ray Strode [halfline] 2015-04-23 17:50:25 UTC
Created attachment 302260 [details] [review]
xwayland: plug some leaks in stop function

This commit makes sure the lockfile and display
name are freed in meta_xwayland_stop.
Comment 6 Ray Strode [halfline] 2015-04-23 17:50:56 UTC
Jasper looked at these and gave them the rubber stamp.
Comment 7 Ray Strode [halfline] 2015-04-23 17:51:29 UTC
Attachment 302256 [details] pushed as 40cccb5 - xwayland: use out label for cleanup in start function
Attachment 302257 [details] pushed as 33bfcf5 - xwayland: free lockfile in start function on error
Attachment 302258 [details] pushed as a8a5da7 - xwayland: don't unlink lock file twice in stop function
Attachment 302259 [details] pushed as 8937c32 - xwayland: rename lockfile to lock_file
Attachment 302260 [details] pushed as eb56e0a - xwayland: plug some leaks in stop function