summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/xcb/qxcbxsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/xcb/qxcbxsettings.cpp')
-rw-r--r--src/plugins/platforms/xcb/qxcbxsettings.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/xcb/qxcbxsettings.cpp b/src/plugins/platforms/xcb/qxcbxsettings.cpp
index c106bd00f8..1423c6262d 100644
--- a/src/plugins/platforms/xcb/qxcbxsettings.cpp
+++ b/src/plugins/platforms/xcb/qxcbxsettings.cpp
@@ -221,6 +221,7 @@ QXcbXSettings::QXcbXSettings(QXcbScreen *screen)
xcb_intern_atom_reply_t *atom_reply = xcb_intern_atom_reply(screen->xcb_connection(),atom_cookie,&error);
if (error) {
qWarning() << Q_FUNC_INFO << "Failed to find XSETTINGS_S atom";
+ free(error);
return;
}
xcb_atom_t selection_owner_atom = atom_reply->atom;
@@ -233,14 +234,15 @@ QXcbXSettings::QXcbXSettings(QXcbScreen *screen)
xcb_get_selection_owner_reply(screen->xcb_connection(), selection_cookie, &error);
if (error) {
qWarning() << Q_FUNC_INFO << "Failed to get selection owner for XSETTINGS_S atom";
+ free(error);
return;
}
d_ptr->x_settings_window = selection_result->owner;
+ free(selection_result);
if (!d_ptr->x_settings_window) {
return;
}
- free(selection_result);
const uint32_t event = XCB_CW_EVENT_MASK;
const uint32_t event_mask[] = { XCB_EVENT_MASK_STRUCTURE_NOTIFY|XCB_EVENT_MASK_PROPERTY_CHANGE };