summaryrefslogtreecommitdiffstats
path: root/src/client
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2017-12-15 13:35:20 +0100
committerJohan Helsing <johan.helsing@qt.io>2017-12-18 08:28:04 +0000
commita570edd5907b121ce35d58de2d852a9243266321 (patch)
tree5b01d39d85b8979ddbbe39220492dfdec1b9f506 /src/client
parent008396b98e9e5c09160a9858d822b8165882931a (diff)
Client: Don't leak the last Wayland sync callback
If QWaylandDisplay is deleted while waiting for a sync callback, don't leak the callback. Change-Id: I4fd46cdc8c431e44998d70d1afc01018c4908f27 Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
Diffstat (limited to 'src/client')
-rw-r--r--src/client/qwaylanddisplay.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp
index 360da7a5c..02b1fd9a9 100644
--- a/src/client/qwaylanddisplay.cpp
+++ b/src/client/qwaylanddisplay.cpp
@@ -157,6 +157,9 @@ QWaylandDisplay::QWaylandDisplay(QWaylandIntegration *waylandIntegration)
QWaylandDisplay::~QWaylandDisplay(void)
{
+ if (mSyncCallback)
+ wl_callback_destroy(mSyncCallback);
+
qDeleteAll(mInputDevices);
mInputDevices.clear();