From 61ab042d7aefd769c9b8f65f5f238347412dcc7a Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Fri, 14 Aug 2020 16:49:33 +0200 Subject: [PATCH] Don't leak QTimer Make sure it's parented so it eventually gets cleaned up. Found using ASAN. --- keyboard_repeat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/keyboard_repeat.cpp b/keyboard_repeat.cpp index ac0388b41..b6208824f 100644 --- a/keyboard_repeat.cpp +++ b/keyboard_repeat.cpp @@ -20,7 +20,7 @@ namespace KWin KeyboardRepeat::KeyboardRepeat(Xkb *xkb) : QObject() - , m_timer(new QTimer) + , m_timer(new QTimer(this)) , m_xkb(xkb) { connect(m_timer, &QTimer::timeout, this, &KeyboardRepeat::handleKeyRepeat);